/// <summary> /// http://www.ecma-international.org/ecma-262/5.1/#sec-12.13 /// </summary> /// <param name="throwStatement"></param> /// <returns></returns> public Completion ExecuteThrowStatement(ThrowStatement throwStatement) { var exprRef = _engine.EvaluateExpression(throwStatement.Argument); Completion c = new Completion(Completion.Throw, _engine.GetValue(exprRef), null); c.Location = throwStatement.Location; return c; }
private void EmitThrowStatement(ThrowStatement s) { Write("throw "); Emit(s.Argument); Write(";"); }