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)); mixin (visitIfNotNull!(functionBody));
} }
/** */ FunctionBody functionBody; /** */ FunctionBody functionBody;
/** */ MemberFunctionAttribute[] memberFunctionAttributes;
} }
/// ///

View File

@ -4134,7 +4134,7 @@ q{(int a, ...)
* Parses a Postblit * Parses a Postblit
* *
* $(GRAMMAR $(RULEDEF 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() Postblit parsePostblit()
@ -4144,6 +4144,8 @@ q{(int a, ...)
expect(tok!"("); expect(tok!"(");
expect(tok!"this"); expect(tok!"this");
expect(tok!")"); expect(tok!")");
while (currentIsMemberFunctionAttribute())
node.memberFunctionAttributes ~= parseMemberFunctionAttribute();
if (currentIs(tok!";")) if (currentIs(tok!";"))
advance(); advance();
else else