jscript: Added break statement implementation.
This commit is contained in:
parent
2b16387708
commit
32a3a167b6
|
@ -671,10 +671,21 @@ HRESULT continue_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT break_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret)
|
||||
/* ECMA-262 3rd Edition 12.8 */
|
||||
HRESULT break_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
branch_statement_t *stat = (branch_statement_t*)_stat;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if(stat->identifier) {
|
||||
FIXME("indentifier not implemented\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
rt->type = RT_BREAK;
|
||||
V_VT(ret) = VT_EMPTY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 12.9 */
|
||||
|
|
|
@ -446,4 +446,20 @@ case false:
|
|||
}
|
||||
ok(state === "false", "state = " + state);
|
||||
|
||||
state = "";
|
||||
switch(1) {
|
||||
case "1":
|
||||
ok(false, "unexpected case \"1\"");
|
||||
case 1:
|
||||
ok(state === "", "case 1: state = " + state);
|
||||
state = "1";
|
||||
default:
|
||||
ok(state === "1", "default: state = " + state);
|
||||
state = "default";
|
||||
break;
|
||||
case false:
|
||||
ok(false, "unexpected case false");
|
||||
}
|
||||
ok(state === "default", "state = " + state);
|
||||
|
||||
reportSuccess();
|
||||
|
|
Loading…
Reference in New Issue