Lines Matching defs:token

5 from .pgen2 import token
17 [keyword, Leaf(token.EQUAL, "="), value])
20 return Leaf(token.LPAR, "(")
23 return Leaf(token.RPAR, ")")
34 target + [Leaf(token.EQUAL, "=", prefix=" ")] + source)
38 return Leaf(token.NAME, name, prefix=prefix)
46 return Leaf(token.COMMA, ",")
50 return Leaf(token.DOT, ".")
68 return Leaf(token.NEWLINE, "\n")
72 return Leaf(token.NEWLINE, "")
75 return Leaf(token.NUMBER, n, prefix=prefix)
79 return Node(syms.trailer, [Leaf(token.LBRACE, "["),
81 Leaf(token.RBRACE, "]")])
85 return Leaf(token.STRING, string, prefix=prefix)
95 for_leaf = Leaf(token.NAME, "for")
97 in_leaf = Leaf(token.NAME, "in")
102 if_leaf = Leaf(token.NAME, "if")
107 [Leaf(token.LBRACE, "["),
109 Leaf(token.RBRACE, "]")])
123 children = [Leaf(token.NAME, "from"),
124 Leaf(token.NAME, package_name, prefix=" "),
125 Leaf(token.NAME, "import", prefix=" "),
253 if prev is not None and prev.type == token.DOT:
264 (prev is not None and prev.type == token.COMMA) or
276 if indent.type == token.INDENT:
344 node.children[0].type == token.STRING):
350 Leaf(token.NAME, "import"),
351 Leaf(token.NAME, name, prefix=" ")
354 import_ = FromImport(package, [Leaf(token.NAME, name, prefix=" ")])
382 if kid.type == token.COLON and kid.value == ":":
410 elif node.type == token.NAME and node.value == name:
426 elif child.type == token.NAME and child.value == name:
430 if last.type == token.NAME and last.value == name:
432 elif imp.type == token.NAME and imp.value == name:
447 if child.type == token.NAME and child.value == name:
449 elif n.type == token.NAME and n.value == name:
451 elif package and n.type == token.STAR: