Lines Matching refs:Leaf
6 from .pytree import Leaf, Node
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=" "),
164 and isinstance(node.children[0], Leaf)
166 and isinstance(node.children[2], Leaf)
174 and isinstance(node.children[0], Leaf)
175 and isinstance(node.children[-1], Leaf)
350 Leaf(token.NAME, "import"),
351 Leaf(token.NAME, name, prefix=" ")
354 import_ = FromImport(package, [Leaf(token.NAME, name, prefix=" ")])