Ancestry.QueryProcessor.Parse.Lexer.PeekTokenSymbol C# (CSharp) 메소드

PeekTokenSymbol() 공개 메소드

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
리턴 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;
        }