internal static LispExecutionState CreateExecutionState(LispStackFrame stackFrame, string inputName, LispObject obj, bool useTailCalls, bool allowHalting, bool createDribbleInstructions) { var executionState = CreateExecutionState(stackFrame, inputName, string.Empty, useTailCalls, allowHalting); executionState.InsertObjectOperations(obj, createDribbleInstructions); return(executionState); }
internal static LispExecutionState CreateExecutionState(LispStackFrame stackFrame, string inputName, string code, bool useTailCalls, bool allowHalting) { var reader = new StringReader(code); var executionState = new LispExecutionState(stackFrame, inputName, reader, useTailCalls, allowHalting); return(executionState); }
private string CreateTracePrefix(LispStackFrame frame, bool isFunctionEnter) { var depth = Math.Max(0, frame.Depth - 1); var indent = new string(' ', depth); return($"{indent}{depth}"); }
private LispExecutionState(LispStackFrame stackFrame, string inputName, TextReader codeReader, bool useTailCalls, bool allowHalting) { _operationQueue = new List <ILispEvaluatorOperation>(); CodeInputStream = new LispTextStream(inputName, codeReader, TextWriter.Null); StackFrame = stackFrame; UseTailCalls = useTailCalls; AllowHalting = allowHalting; }
internal LispStackFrame(LispInvocableObject function, LispStackFrame parent) : this(function.NameSymbol, parent) { Function = function; }
protected LispStackFrame(LispResolvedSymbol functionSymbol, LispStackFrame parent) { FunctionSymbol = functionSymbol; Parent = parent; Depth = (Parent?.Depth ?? LispRootStackFrame.RootStackDepth) + 1; }
public LispErrorOccuredEventArgs(LispError error, LispStackFrame stackFrame) { Error = error; StackFrame = stackFrame; }