Lines Matching refs:token
17 from .pgen2 import driver, literals, token, tokenize, parse, grammar
30 skip = {token.NEWLINE, token.INDENT, token.DEDENT}
101 if len(nodes) >= 3 and nodes[1].type == token.EQUAL:
116 if child.type == token.STAR:
119 elif child.type == token.PLUS:
122 elif child.type == token.LBRACE:
123 assert children[-1].type == token.RBRACE
142 if node.type == token.STRING:
145 elif node.type == token.NAME:
149 raise PatternSyntaxError("Invalid token: %r" % value)
151 raise PatternSyntaxError("Can't have details for token")
174 assert node.type == token.NUMBER
179 TOKEN_MAP = {"NAME": token.NAME,
180 "STRING": token.STRING,
181 "NUMBER": token.NUMBER,
187 return token.NAME