public InterpreterInstructionBase Execute(InterpreterContext context) { try { var result = Evaluator.Evaluate(context, Instruction); return(SetResult(result)); } catch (Exception ex) { var res = new Evaluator.EvaluatorResult(ex); return(SetResult(res)); } }
/// <summary> /// Sets the pointer to the Next instruction based on the result passed in /// </summary> protected abstract InterpreterInstructionBase SetResult(Evaluator.EvaluatorResult result);