private Token NextToken() { _token = _lookahead; FetchLookahead(); return _token.Token; }
private void FetchLookahead() { _lookahead = new TokenWithSpan(_tokenizer.GetNextToken(), _tokenizer.TokenSpan); }
public void Reset(SourceUnit sourceUnit) { ContractUtils.RequiresNotNull(sourceUnit, "_sourceUnit"); _sourceUnit = sourceUnit; _token = new TokenWithSpan(); _lookahead = new TokenWithSpan(); _parsingStarted = false; _errorCode = 0; _openParen = 0; }
private void ReportSyntaxError(TokenWithSpan t, int errorCode) { ReportSyntaxError(t.Token, t.Span, errorCode, true); }
private void ReportSyntaxError(TokenWithSpan t) { ReportSyntaxError(t, ErrorCodes.SyntaxError); }
public void Reset(SourceUnit sourceUnit, ModuleOptions languageFeatures) { ContractUtils.RequiresNotNull(sourceUnit, "sourceUnit"); _sourceUnit = sourceUnit; _languageFeatures = languageFeatures; _token = new TokenWithSpan(); _lookahead = new TokenWithSpan(); _functions = null; _parsingStarted = false; _errorCode = 0; _importAllowed = true; }