Commit 32a3a167 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added break statement implementation.

parent 2b163877
......@@ -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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment