Module: wine Branch: master Commit: b485d58293bd7403a79d29c75a5b31b18b3cf52a URL: https://source.winehq.org/git/wine.git/?a=commit;h=b485d58293bd7403a79d29c75...
Author: Jacek Caban jacek@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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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;