mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix parser to allow eval(i)++ to compile (352453, r=mrbkap).
This commit is contained in:
parent
f8f42fffb6
commit
802d01541d
@ -4052,7 +4052,8 @@ SetLvalKid(JSContext *cx, JSTokenStream *ts, JSParseNode *pn, JSParseNode *kid,
|
||||
if (kid->pn_type != TOK_NAME &&
|
||||
kid->pn_type != TOK_DOT &&
|
||||
#if JS_HAS_LVALUE_RETURN
|
||||
(kid->pn_type != TOK_LP || kid->pn_op != JSOP_CALL) &&
|
||||
(kid->pn_type != TOK_LP ||
|
||||
(kid->pn_op != JSOP_CALL && kid->pn_op != JSOP_EVAL)) &&
|
||||
#endif
|
||||
#if JS_HAS_XML_SUPPORT
|
||||
(kid->pn_type != TOK_UNARYOP || kid->pn_op != JSOP_XMLNAME) &&
|
||||
@ -4095,7 +4096,7 @@ SetIncOpKid(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
|
||||
|
||||
#if JS_HAS_LVALUE_RETURN
|
||||
case TOK_LP:
|
||||
JS_ASSERT(kid->pn_op == JSOP_CALL);
|
||||
JS_ASSERT(kid->pn_op == JSOP_CALL || kid->pn_op == JSOP_EVAL);
|
||||
kid->pn_op = JSOP_SETCALL;
|
||||
/* FALL THROUGH */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user