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:
parent
e6e5d34152
commit
a5fc9b34ec
1 changed files with 8 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue