jscript: Added continue statement implementation.
This commit is contained in:
parent
7bde1a3345
commit
9933568063
|
@ -707,10 +707,21 @@ HRESULT forin_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_t *
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT continue_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret)
|
/* ECMA-262 3rd Edition 12.7 */
|
||||||
|
HRESULT continue_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
branch_statement_t *stat = (branch_statement_t*)_stat;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
|
if(stat->identifier) {
|
||||||
|
FIXME("indentifier not implemented\n");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
rt->type = RT_CONTINUE;
|
||||||
|
V_VT(ret) = VT_EMPTY;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ECMA-262 3rd Edition 12.8 */
|
/* ECMA-262 3rd Edition 12.8 */
|
||||||
|
|
|
@ -582,4 +582,15 @@ do {
|
||||||
} while(false);
|
} while(false);
|
||||||
ok(tmp === 1, "tmp !== 4");
|
ok(tmp === 1, "tmp !== 4");
|
||||||
|
|
||||||
|
tmp = 0;
|
||||||
|
while(tmp < 4) {
|
||||||
|
tmp++;
|
||||||
|
if(tmp === 2) {
|
||||||
|
continue;
|
||||||
|
ok(false, "break did not break");
|
||||||
|
}
|
||||||
|
ok(tmp <= 4 && tmp != 2, "tmp = " + tmp);
|
||||||
|
}
|
||||||
|
ok(tmp === 4, "tmp !== 4");
|
||||||
|
|
||||||
reportSuccess();
|
reportSuccess();
|
||||||
|
|
Loading…
Reference in New Issue