Merge pull request #142 from callumenator/postblit-attr
Allow member func attrs after postblit
This commit is contained in:
commit
f146cc8d89
|
@ -1996,6 +1996,7 @@ public:
|
|||
mixin (visitIfNotNull!(functionBody));
|
||||
}
|
||||
/** */ FunctionBody functionBody;
|
||||
/** */ MemberFunctionAttribute[] memberFunctionAttributes;
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
@ -4140,7 +4140,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()
|
||||
|
@ -4150,6 +4150,10 @@ q{(int a, ...)
|
|||
expect(tok!"(");
|
||||
expect(tok!"this");
|
||||
expect(tok!")");
|
||||
MemberFunctionAttribute[] memberFunctionAttributes;
|
||||
while (currentIsMemberFunctionAttribute())
|
||||
memberFunctionAttributes ~= parseMemberFunctionAttribute();
|
||||
node.memberFunctionAttributes = ownArray(memberFunctionAttributes);
|
||||
if (currentIs(tok!";"))
|
||||
advance();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue