mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-18 01:39:03 +02:00
DMD 2.032 Merge.
This commit is contained in:
22
dmd2/parse.c
22
dmd2/parse.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user