mirror of
https://github.com/ccxvii/mujs.git
synced 2026-09-25 19:23:34 +08:00
Implement with statement.
This commit is contained in:
@@ -793,6 +793,18 @@ static void jsR_run(js_State *J, js_Function *F)
|
||||
js_pushnumber(J, toint32(x) | toint32(y));
|
||||
break;
|
||||
|
||||
/* With */
|
||||
|
||||
case OP_WITH:
|
||||
obj = js_toobject(J, -1);
|
||||
J->E = jsR_newenvironment(J, obj, J->E);
|
||||
js_pop(J, 1);
|
||||
break;
|
||||
|
||||
case OP_ENDWITH:
|
||||
J->E = J->E->outer;
|
||||
break;
|
||||
|
||||
/* Branching */
|
||||
|
||||
case OP_DEBUGGER:
|
||||
|
||||
Reference in New Issue
Block a user