private Token GetCurrentToken() { if (currentToken == null) { if (scanner.InternalMoveNext()) { currentToken = scanner.Current; } } return currentToken; }
/// <summary> /// Consumes the current token and increments the parsed token count /// </summary> internal void ConsumeCurrent() { ++tokensParsed; tokenAvailable = false; current = null; }
internal bool InternalMoveNext() { if (!tokenAvailable && !streamEndProduced) { FetchMoreTokens(); } if (tokens.Count > 0) { current = tokens.Dequeue(); tokenAvailable = false; return true; } else { current = null; return false; } }
private void Skip() { if (currentToken != null) { currentToken = null; scanner.ConsumeCurrent(); } }