Distinguish between conditional dec and stmnt

This commit is contained in:
Callum Anderson 2014-02-24 11:17:26 +11:00
parent ee940f3d30
commit 083c3f5d41
1 changed files with 9 additions and 1 deletions

View File

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