public ScriptValue Run(ExecutionContext executionContext) { if (code is BlockStatementNode block) { EvaluateWalker.Walk(block.Body, executionContext); return(ScriptValue.Undefined); } var expressionReference = EvaluateWalker.Walk(code, executionContext); return(executionContext.Realm.Agent.GetValue(expressionReference)); }
public ScriptValue Evaluate(ExecutionContext context) { var result = EvaluateWalker.Walk(node.Body, context); return(result.IsValue ? result.Value : ScriptValue.Undefined); }
public ScriptValue Evaluate(ExecutionContext context) { return(EvaluateWalker.Walk(node.Body, context).Value); }