jscript: Fix do while loop parsing.
This commit is contained in:
parent
b5a82030ad
commit
60748ebf51
|
@ -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); }
|
||||
|
|
|
@ -671,6 +671,13 @@ do {
|
|||
} while(false);
|
||||
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++;
|
||||
|
|
Loading…
Reference in New Issue