Merge pull request #122 from callumenator/conditional-fix

Distinguish between conditional dec and stmnt
This commit is contained in:
Hackerpilot 2014-02-23 16:36:12 -08:00
commit 9c6c340c74
1 changed files with 9 additions and 1 deletions

View File

@ -6105,7 +6105,15 @@ protected:
return !peekIs(tok!"switch"); return !peekIs(tok!"switch");
case tok!"debug": case tok!"debug":
case tok!"version": case tok!"version":
return !peekIs(tok!"="); {
if (peekIs(tok!"="))
return false;
auto b = setBookmark();
scope (exit) goToBookmark(b);
advance();
return isDeclaration();
}
case tok!"synchronized": case tok!"synchronized":
if (peekIs(tok!"(")) if (peekIs(tok!"("))
return false; return false;