Fix mixin declarations

This commit is contained in:
Hackerpilot 2013-11-07 14:56:51 -08:00
parent 87ed0bd3b4
commit 00768c371a
1 changed files with 15 additions and 7 deletions

View File

@ -1686,6 +1686,8 @@ class ClassFour(A, B) if (someTest()) : Super {}}c;
{ {
auto b = setBookmark(); auto b = setBookmark();
advance(); advance();
if (currentIs(TokenType.lParen))
{
auto t = peekPastParens(); auto t = peekPastParens();
if (t !is null && t.type == TokenType.semicolon) if (t !is null && t.type == TokenType.semicolon)
{ {
@ -1700,6 +1702,12 @@ class ClassFour(A, B) if (someTest()) : Super {}}c;
return null; return null;
} }
} }
else
{
goToBookmark(b);
node.mixinDeclaration = parseMixinDeclaration();
}
}
break; break;
case pragma_: case pragma_:
node.pragmaDeclaration = parsePragmaDeclaration(); node.pragmaDeclaration = parsePragmaDeclaration();