Lines Matching refs:Token

93 class Token(Enum):  # pylint: disable=too-few-public-methods  class
173 if self.token != Token.SPACE and self.token != Token.COMMENT:
177 self.token = Token.EOF
322 (Token.IDENT, '[A-Za-z_][0-9A-Za-z_]*'),
323 (Token.LPAREN, '\\('),
324 (Token.RPAREN, '\\)'),
325 (Token.LBRACKET, '\\['),
326 (Token.RBRACKET, '\\]'),
327 (Token.LBRACE, '\\{'),
328 (Token.RBRACE, '\\}'),
329 (Token.COLON, ':'),
330 (Token.ASSIGN, '='),
331 (Token.ASSIGNPLUS, '\\+='),
332 (Token.PLUS, '\\+'),
333 (Token.COMMA, ','),
334 (Token.STRING, '["`]'),
335 (Token.INTEGER, '-{0,1}[0-9]+'),
337 (Token.COMMENT,
339 (Token.SPACE, '\\s+'),
366 if token == Token.STRING:
370 if token in {Token.IDENT, Token.INTEGER}:
588 while lexer.token != Token.EOF:
589 if lexer.token == Token.IDENT:
591 if lexer.token in {Token.ASSIGN, Token.ASSIGNPLUS}:
593 elif lexer.token in {Token.LBRACE, Token.LPAREN}:
600 lexer.consume(Token.EOF)
619 if assign_token == Token.ASSIGNPLUS:
634 self.lexer.consume(Token.IDENT)
651 lexer.consume(Token.IDENT)
659 lexer.consume(Token.STRING)
667 lexer.consume(Token.INTEGER)
675 if token == Token.STRING:
677 if token == Token.IDENT:
679 if token == Token.INTEGER:
681 if token == Token.LBRACKET:
683 if token == Token.LBRACE:
685 if token == Token.LPAREN:
686 lexer.consume(Token.LPAREN)
688 lexer.consume(Token.RPAREN)
697 while lexer.token == Token.PLUS:
698 lexer.consume(Token.PLUS)
707 lexer.consume(Token.LBRACKET)
708 while lexer.token != Token.RBRACKET:
710 if lexer.token == Token.COMMA:
711 lexer.consume(Token.COMMA)
712 lexer.consume(Token.RBRACKET)
721 is_func_syntax = lexer.token == Token.LPAREN
723 lexer.consume(Token.LPAREN)
725 lexer.consume(Token.LBRACE)
727 while lexer.token != Token.RBRACE and lexer.token != Token.RPAREN:
728 if lexer.token != Token.IDENT:
732 if lexer.token == Token.ASSIGN:
733 lexer.consume(Token.ASSIGN)
735 lexer.consume(Token.COLON)
740 if lexer.token == Token.COMMA:
741 lexer.consume(Token.COMMA)
744 lexer.consume(Token.RPAREN)
746 lexer.consume(Token.RBRACE)