Ancestry.QueryProcessor.Parse.Lexer.PeekTokenSymbol C# (CSharp) Method

PeekTokenSymbol() public method

Gets the symbol the specified number of tokens ahead without advancing the current token.
If the token is not a symbol, returns an empty string.
public PeekTokenSymbol ( int count ) : string
count int
return string
        public string PeekTokenSymbol(int count)
        {
            LexerToken token = this[count];
            if (token.Type == TokenType.Symbol)
                return token.Token;
            else if (token.Type == TokenType.Error)
                throw token.Error;
            else
                return String.Empty;
        }