Jacek Caban : jscript: Set error location when handling errors directly in parser.

Alexandre Julliard julliard at winehq.org
Thu Nov 26 16:31:00 CST 2020


Module: wine
Branch: master
Commit: b485d58293bd7403a79d29c75a5b31b18b3cf52a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b485d58293bd7403a79d29c75a5b31b18b3cf52a

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Nov 26 15:27:50 2020 +0100

jscript: Set error location when handling errors directly in parser.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/jscript/parser.y | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index 507369ca202..6016be6cfd8 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -780,7 +780,7 @@ ObjectLiteral
         {
             if(ctx->script->version < 2) {
                 WARN("Trailing comma in object literal is illegal in legacy mode.\n");
-                ctx->hres = JS_E_SYNTAX;
+                set_error(ctx, @3, JS_E_SYNTAX);
                 YYABORT;
             }
             $$ = new_prop_and_value_expression(ctx, $2);
@@ -824,7 +824,7 @@ IdentifierName
             if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
                 WARN("%s keyword used as an identifier in legacy mode.\n",
                      debugstr_w($1));
-                ctx->hres = JS_E_SYNTAX;
+                set_error(ctx, @$, JS_E_SYNTAX);
                 YYABORT;
             }
             $$ = $1;




More information about the wine-cvs mailing list