Commit 60748ebf authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

jscript: Fix do while loop parsing.

parent b5a82030
......@@ -386,7 +386,7 @@ IfStatement
/* ECMA-262 3rd Edition 12.6 */
IterationStatement
: kDO Statement kWHILE '(' Expression ')' ';'
: kDO Statement kWHILE '(' Expression ')' semicolon_opt
{ $$ = new_while_statement(ctx, TRUE, $5, $2); }
| kWHILE '(' Expression ')' Statement
{ $$ = new_while_statement(ctx, FALSE, $3, $5); }
......
......@@ -672,6 +672,13 @@ do {
ok(tmp === 1, "tmp !== 1");
tmp = 0;
do {
ok(tmp < 4, "tmp >= 4");
tmp++;
} while(tmp < 4)
ok(tmp === 4, "tmp !== 4")
tmp = 0;
while(tmp < 4) {
tmp++;
if(tmp === 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment