Allow member func attrs after postblit

This commit is contained in:
Callum Anderson 2014-03-06 10:29:29 +11:00
parent 3ddac7885f
commit db71af8ddb
2 changed files with 4 additions and 1 deletions

View File

@ -1996,6 +1996,7 @@ public:
mixin (visitIfNotNull!(functionBody));
}
/** */ FunctionBody functionBody;
/** */ MemberFunctionAttribute[] memberFunctionAttributes;
}
///

View File

@ -4134,7 +4134,7 @@ q{(int a, ...)
* Parses a Postblit
*
* $(GRAMMAR $(RULEDEF postblit):
* $(LITERAL 'this') $(LITERAL '$(LPAREN)') $(LITERAL 'this') $(LITERAL '$(RPAREN)') ($(RULE functionBody) | $(LITERAL ';'))
* $(LITERAL 'this') $(LITERAL '$(LPAREN)') $(LITERAL 'this') $(LITERAL '$(RPAREN)') $(RULE memberFunctionAttribute)* ($(RULE functionBody) | $(LITERAL ';'))
* ;)
*/
Postblit parsePostblit()
@ -4144,6 +4144,8 @@ q{(int a, ...)
expect(tok!"(");
expect(tok!"this");
expect(tok!")");
while (currentIsMemberFunctionAttribute())
node.memberFunctionAttributes ~= parseMemberFunctionAttribute();
if (currentIs(tok!";"))
advance();
else