Home | History | Annotate | Download | only in lib2to3

Lines Matching full:token

18 from .pgen2 import driver, literals, token, tokenize, parse, grammar
35 skip = set((token.NEWLINE, token.INDENT, token.DEDENT))
102 if len(nodes) >= 3 and nodes[1].type == token.EQUAL:
117 if child.type == token.STAR:
120 elif child.type == token.PLUS:
123 elif child.type == token.LBRACE:
124 assert children[-1].type == token.RBRACE
143 if node.type == token.STRING:
146 elif node.type == token.NAME:
150 raise PatternSyntaxError("Invalid token: %r" % value)
152 raise PatternSyntaxError("Can't have details for token")
175 assert node.type == token.NUMBER
180 TOKEN_MAP = {"NAME": token.NAME,
181 "STRING": token.STRING,
182 "NUMBER": token.NUMBER,
183 "TOKEN": None}
188 return token.NAME