This commit is contained in:
Hackerpilot 2014-02-22 12:52:52 -08:00
commit d979e7ca22
1 changed files with 5 additions and 1 deletions

View File

@ -3384,7 +3384,7 @@ invariant() foo();
{ {
mixin(traceEnterAndExit!(__FUNCTION__)); mixin(traceEnterAndExit!(__FUNCTION__));
auto node = new MixinDeclaration; auto node = new MixinDeclaration;
if (peekIs(tok!"identifier")) if (peekIs(tok!"identifier") || peekIs(tok!"typeof"))
node.templateMixinExpression = parseTemplateMixinExpression(); node.templateMixinExpression = parseTemplateMixinExpression();
else if (peekIs(tok!"(")) else if (peekIs(tok!"("))
node.mixinExpression = parseMixinExpression(); node.mixinExpression = parseMixinExpression();
@ -3527,6 +3527,8 @@ invariant() foo();
if (currentIs(tok!"(")) if (currentIs(tok!"("))
node.allocatorArguments = parseArguments(); node.allocatorArguments = parseArguments();
expect(tok!"class"); expect(tok!"class");
if (currentIs(tok!"("))
node.constructorArguments = parseArguments();
if (!currentIs(tok!"{")) if (!currentIs(tok!"{"))
node.baseClassList = parseBaseClassList(); node.baseClassList = parseBaseClassList();
node.structBody = parseStructBody(); node.structBody = parseStructBody();
@ -4149,6 +4151,8 @@ q{(int a, ...)
auto b = setBookmark(); auto b = setBookmark();
advance(); // function | delegate advance(); // function | delegate
skipParens(); skipParens();
while (isAttribute())
parseAttribute();
if (currentIs(tok!"=>")) if (currentIs(tok!"=>"))
{ {
goToBookmark(b); goToBookmark(b);