Tokenizer::setVarIdNew: variable declarations dont start with NOT/goto/return/delete/etc

This commit is contained in:
Daniel Marjamäki 2012-04-15 18:02:49 +02:00
parent 46bfe27831
commit b0dc708b4d
1 changed files with 2 additions and 1 deletions

View File

@ -2911,7 +2911,8 @@ void Tokenizer::setVarIdNew()
break; break;
// Variable declaration can't start with "return", etc // Variable declaration can't start with "return", etc
if (tok2->str() == "return") if (tok2->str() == "return" || tok2->str() == "NOT" || tok2->str() == "goto" ||
tok2->str() == "delete" || tok2->str() == "throw")
continue; continue;
const bool decl = setVarIdParseDeclaration(&tok2, variableId, executableScope.top()); const bool decl = setVarIdParseDeclaration(&tok2, variableId, executableScope.top());