public DObject ExecuteFunction(InterpreterLocation functionLocation) { int originalDepth = depth; Eat("l curly"); returnValue = null; while (depth != originalDepth) { if (returnValue != null || shouldBreak) { while (depth > originalDepth + 1) { Eat(); } break; } evaluator.Evaluate(); } var v = returnValue == null ? DVoid.instance : returnValue; returnValue = null; return(v); }
public void BeginLoop(InterpreterLocation beginning) { loopLocations.Push(beginning); }
/// <summary> /// Goes to a location in code, changing scope and deleting unscoped variables /// </summary> /// <param name="location"></param> public void Goto(InterpreterLocation location) { pointer = location.pointer; depth = location.depth; heap.DeleteUnscopedVariables(); }