Ancestry.QueryProcessor.Parse.LexerToken.CheckSymbol C# (CSharp) Method

CheckSymbol() public method

Ensures that the current TokenType is a symbol equal to the given symbol.
Will raise a LexerException if it is not.
public CheckSymbol ( string symbol ) : void
symbol string
return void
        public void CheckSymbol(string symbol)
        {
            if ((Type != TokenType.Symbol) || !String.Equals(Token, symbol, StringComparison.Ordinal))
                throw new LexerException(LexerException.Codes.SymbolExpected, symbol);
        }