From 2c255287cd9507f4d4018da6918f8dcbc5e92a76 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 27 Aug 2009 01:21:03 +0200 Subject: [PATCH] jscript: Don't require semicolon after function declaration. --- dlls/jscript/parser.y | 2 ++ dlls/jscript/tests/lang.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 7e74880a7cb..748a06a13bf 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 fd14c934567..8ab4d1e650f 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();