DMD 2.032 Merge.

This commit is contained in:
Robert Clipsham
2009-09-08 10:07:56 +01:00
parent 8b6f11938a
commit 089e792258
38 changed files with 1732 additions and 586 deletions

View File

@@ -2266,7 +2266,7 @@ Type *Parser::parseBasicType2(Type *t)
nextToken();
arguments = parseParameters(&varargs);
while (1)
{ // Postfixes of 'pure' or 'nothrow'
{ // Postfixes
if (token.value == TOKpure)
ispure = true;
else if (token.value == TOKnothrow)
@@ -2433,6 +2433,22 @@ Type *Parser::parseDeclarator(Type *t, Identifier **pident, TemplateParameters *
((TypeFunction *)tf)->ispure = 1;
nextToken();
continue;
case TOKat:
nextToken();
if (token.value != TOKidentifier)
{ error("attribute identifier expected");
nextToken();
continue;
}
Identifier *id = token.ident;
if (id == Id::property)
((TypeFunction *)tf)->ispure = 1;
else
error("valid attribute identifiers are property, not %s", id->toChars());
nextToken();
continue;
}
break;
}
@@ -4361,6 +4377,10 @@ int Parser::isDeclarator(Token **pt, int *haveId, enum TOK endtok)
case TOKnothrow:
t = peek(t);
continue;
case TOKat:
t = peek(t); // skip '@'
t = peek(t); // skip identifier
continue;
default:
break;
}