public void MoveTo(StatementMarker other) { this.lines = other.lines; this.LineIndex = other.LineIndex; this.Line = other.Line; this.LineNumber = other.LineNumber; this.StatementIndex = other.StatementIndex; this.Statement = other.Statement; this.Valid = other.Valid; }
public ForNextLoopState(StatementMarker startMarker, VariableNameToken _variableNameToken, NumericValueToken _startValue, NumericValueToken _endValue, NumericValueToken _stepValue) { LoopMarker = startMarker; VariableNameToken = _variableNameToken; StartValue = _startValue; EndValue = _endValue; StepValue = _stepValue; CurrentValue = StartValue; ImmediateModeStatementIndex = -1; }
public Interpreter(IConsole console = null) { TokensProvider = new TokensProvider(); TokensProvider.RegisterTokens(); tokenizer = new Tokenizer(TokensProvider); Lines = new SortedList <int, Line>(); VariablesEnvironment = new InterpreterVariables(this); ExpressionEvaluator = new ExpressionEvaluator(this); CurrentStatementMarker = new StatementMarker(Lines); CurrentImmediateModeStatementMarker = null; NextStatementMarker = null; DataStatementMarker = new StatementMarker(Lines); DataTokenMarker = null; GosubMarkers = new Stack <StatementMarker>(); ForNextLoops = new Stack <ForNextLoopState>(); ContinueRunning = false; InterpreterMode = InterpreterMode.Immmediate; Console = console; }
public StatementMarker(StatementMarker other) { this.MoveTo(other); }