Ancestry.QueryProcessor.Parse.LexerToken.CheckType C# (CSharp) Метод

CheckType() публичный Метод

Ensures that the current TokenType is of the given type.
Will raise a LexerException if it is not.
public CheckType ( TokenType token ) : void
token TokenType
Результат void
        public void CheckType(TokenType token)
        {
            if (Type == TokenType.Error)
                throw Error;
            if (Type != token)
                throw new LexerException(LexerException.Codes.TokenExpected, Enum.GetName(typeof(TokenType), token));
        }