Create() публичный статический Метод

public static Create ( TokenType type ) : Token
type TokenType
Результат Token
Пример #1
0
        private Token ConsumeSingleCharToken(char currentCharacter)
        {
            Token token = TokenFactory.Create(currentCharacter);

            token.Index   = _currentIndex;
            token.Content = Consume().ToString();
            return(token);
        }
Пример #2
0
        private Token ConsumeMultiCharToken(char currentCharacter, Func <string> contentFunc)
        {
            Token token = TokenFactory.Create(currentCharacter);

            return(initToken(token, contentFunc));
        }
Пример #3
0
        private Token ConsumeToken(TokenType type, Func <string> contentFunc)
        {
            Token token = TokenFactory.Create(type);

            return(initToken(token, contentFunc));
        }