Jacek Caban : jscript: Don't require semicolon after function declaration.

Alexandre Julliard julliard at winehq.org
Thu Aug 27 10:31:22 CDT 2009


Module: wine
Branch: master
Commit: 2c255287cd9507f4d4018da6918f8dcbc5e92a76
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2c255287cd9507f4d4018da6918f8dcbc5e92a76

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Aug 27 01:21:03 2009 +0200

jscript: Don't require semicolon after function declaration.

---

 dlls/jscript/parser.y      |    2 ++
 dlls/jscript/tests/lang.js |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index 7e74880..748a06a 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -264,6 +264,8 @@ HtmlComment
 /* ECMA-262 3rd Edition    14 */
 SourceElements
         : /* empty */           { $$ = new_source_elements(ctx); }
+        | SourceElements FunctionExpression
+                                { $$ = $1; }
         | SourceElements Statement
                                 { $$ = source_elements_add_statement($1, $2); }
 
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index fd14c93..8ab4d1e 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -902,5 +902,7 @@ ok(re.source === "=(\\?|%3F)", "re.source = " + re.source);
 ok(createNullBSTR() === '', "createNullBSTR() !== ''");
 
 function do_test() {}
+function nosemicolon() {} nosemicolon();
+function () {} nosemicolon();
 
 reportSuccess();




More information about the wine-cvs mailing list