Lines Matching refs:token
148 self.token = None
158 for token in tokens:
159 if token == self.token:
163 'unexpected token ' + self.token.name)
172 self.token, self.end, self.literal = self.lex(self.buf, self.start)
173 if self.token != Token.SPACE and self.token != Token.COMMENT:
177 self.token = Token.EOF
364 token = cls.LEXER_PATTERNS[match.lastindex - 1][0]
366 if token == Token.STRING:
370 if token in {Token.IDENT, Token.INTEGER}:
375 return (token, end, literal)
588 while lexer.token != Token.EOF:
589 if lexer.token == Token.IDENT:
591 if lexer.token in {Token.ASSIGN, Token.ASSIGNPLUS}:
592 self.parse_assign(ident, lexer.token)
593 elif lexer.token in {Token.LBRACE, Token.LPAREN}:
597 'unexpected token ' + lexer.token.name)
599 raise ParseError(lexer, 'unexpected token ' + lexer.token.name)
674 token = lexer.token
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:
690 raise ParseError(lexer, 'unexpected token ' + token.name)
697 while lexer.token == Token.PLUS:
708 while lexer.token != Token.RBRACKET:
710 if lexer.token == Token.COMMA:
721 is_func_syntax = lexer.token == Token.LPAREN
727 while lexer.token != Token.RBRACE and lexer.token != Token.RPAREN:
728 if lexer.token != Token.IDENT:
729 raise ParseError(lexer, 'unexpected token ' + lexer.token.name)
732 if lexer.token == Token.ASSIGN:
740 if lexer.token == Token.COMMA: