Piotr Caban : jscript: Fix do while loop parsing.
Alexandre Julliard
julliard at winehq.org
Mon Jul 6 09:33:59 CDT 2009
Module: wine
Branch: master
Commit: 60748ebf515ba25b5e7506c54ecaa86486f9d009
URL: http://source.winehq.org/git/wine.git/?a=commit;h=60748ebf515ba25b5e7506c54ecaa86486f9d009
Author: Piotr Caban <piotr.caban at gmail.com>
Date: Mon Jul 6 10:38:23 2009 +0200
jscript: Fix do while loop parsing.
---
dlls/jscript/parser.y | 2 +-
dlls/jscript/tests/lang.js | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index 52a31c8..d47d40d 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -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); }
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index 86eba86..cf04f9e 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -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) {
More information about the wine-cvs
mailing list