void FindDataStatement() { while (DataStatementMarker.Valid && !(DataStatementMarker.Statement.Tokens[0] is DataToken)) { DataStatementMarker.MoveToNextStatement(); } }
public void ClearAll() { Lines.Clear(); VariablesEnvironment.Clear(); ExpressionEvaluator.Clear(); GosubMarkers.Clear(); ForNextLoops.Clear(); DataStatementMarker.MoveTo(0, 0); DataTokenMarker = null; }
public void RunFromLinesIndex(int startIndex = 0) { VariablesEnvironment.Clear(); GosubMarkers.Clear(); ForNextLoops.Clear(); ExpressionEvaluator.Clear(); DataStatementMarker.MoveTo(0, 0); NextStatementMarker = null; DataTokenMarker = null; WarmRunFromIndex(startIndex); }
public ValueToken ReadNextDataValue() { if (DataTokenMarker == null) { FindDataStatement(); if (DataStatementMarker.Valid == false) { return(null); } DataTokenMarker = new TokenMarker(DataStatementMarker.Statement.Tokens); DataTokenMarker.MoveNext(); } if (DataTokenMarker.Token == null) { while (DataTokenMarker.Token == null) { DataStatementMarker.MoveToNextStatement(); FindDataStatement(); if (DataStatementMarker.Valid == false) { return(null); } DataTokenMarker = new TokenMarker(DataStatementMarker.Statement.Tokens); DataTokenMarker.MoveNext(); } } var result = (ValueToken)DataTokenMarker.Token; DataTokenMarker.MoveNext(); if (DataTokenMarker.Token is CommaToken) { DataTokenMarker.MoveNext(); } return(result); }