1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

Fixed javascript parser to handle for statements without iterator terms.

This commit is contained in:
jules 2014-08-19 09:39:06 +01:00
parent e6e5d34152
commit a5fc9b34ec

View file

@ -1145,8 +1145,14 @@ struct JavascriptEngine::RootObject : public DynamicObject
match (TokenTypes::semicolon);
}
s->iterator = parseExpression();
match (TokenTypes::closeParen);
if (matchIf (TokenTypes::closeParen))
s->iterator = new Statement (location);
else
{
s->iterator = parseExpression();
match (TokenTypes::closeParen);
}
s->body = parseStatement();
return s.release();
}