Home
last modified time | relevance | path

Searched refs:pytree (Results 1 - 25 of 25) sorted by relevance

/third_party/python/Lib/lib2to3/tests/
H A Dtest_pytree.py4 """Unit tests for pytree.py.
15 from lib2to3 import pytree namespace
32 self.assertRaises(AssertionError, pytree.Base)
35 l1 = pytree.Leaf(100, "foo")
40 l1 = pytree.Leaf(100, "foo")
44 l1 = pytree.Leaf(100, "foo")
46 l2 = pytree.Leaf(100, "foo", context=(" ", (10, 1)))
52 l1 = pytree.Leaf(2, 5)
57 l1 = pytree.Leaf(100, "foo")
58 l2 = pytree
[all...]
H A Dsupport.py11 from lib2to3 import pytree, refactor namespace
20 driver = pgen2_driver.Driver(grammar, convert=pytree.convert)
23 convert=pytree.convert
H A Dpytree_idempotency.py20 from .. import pytree namespace
28 dr = driver.Driver(gr, convert=pytree.convert)
H A Dtest_util.py7 from lib2to3.pytree import Node, Leaf
/third_party/python/Lib/lib2to3/
H A Dpatcomp.py8 The compiler compiles a pattern to a pytree.*Pattern instance.
20 from . import pytree namespace
56 """Compiles a pattern string to a nested pytree.*Pattern object."""
82 p = pytree.WildcardPattern([[a] for a in alts], min=1, max=1)
89 p = pytree.WildcardPattern([units], min=1, max=1)
94 p = pytree.NegatedPattern(pattern)
118 max = pytree.HUGE
121 max = pytree.HUGE
132 pattern = pytree.WildcardPattern([[pattern]], min=min, max=max)
144 return pytree
[all...]
H A Drefactor.py27 from . import pytree, pygram namespace
48 """ Accepts a pytree Pattern Node and returns a set
51 if isinstance(pat, (pytree.NodePattern, pytree.LeafPattern)):
59 if isinstance(pat, pytree.NegatedPattern):
64 if isinstance(pat, pytree.WildcardPattern):
193 convert=pytree.convert,
398 tree: a pytree.Node instance representing the root of the tree
420 match_set[fixer].sort(key=pytree.Base.depth, reverse=True)
425 match_set[fixer].sort(key=pytree
[all...]
H A Dbtm_matcher.py14 from . import pytree namespace
107 if isinstance(child, pytree.Leaf) and child.value == ";":
153 # taken from pytree.py for debugging; only used by print_ac
H A Dbtm_utils.py3 from . import pytree namespace
148 if (isinstance(node.children[0], pytree.Leaf) and
152 if ((isinstance(node.children[0], pytree.Leaf) and
H A Dpygram.py12 from . import pytree namespace
H A Dfixer_util.py6 from .pytree import Leaf, Node
/third_party/python/Lib/lib2to3/fixes/
H A Dfix_set_literal.py7 from lib2to3 import fixer_base, pytree namespace
31 fake = pytree.Node(syms.listmaker, [single.clone()])
38 literal = [pytree.Leaf(token.LBRACE, "{")]
40 literal.append(pytree.Leaf(token.RBRACE, "}"))
43 maker = pytree.Node(syms.dictsetmaker, literal)
H A Dfix_has_key.py33 from .. import pytree namespace
93 before = pytree.Node(syms.power, before)
98 n_op = pytree.Node(syms.comp_op, (n_not, n_op))
99 new = pytree.Node(syms.comparison, (arg, n_op, before))
102 new = pytree.Node(syms.power, (new,) + tuple(after))
H A Dfix_dict.py31 from .. import pytree namespace
68 args = head + [pytree.Node(syms.trailer,
73 new = pytree.Node(syms.power, args)
78 new = pytree.Node(syms.power, [new] + tail)
H A Dfix_exitfunc.py7 from lib2to3 import pytree, fixer_base namespace
46 register = pytree.Node(syms.power,
67 new_import = pytree.Node(syms.import_name,
70 new = pytree.Node(syms.simple_stmt, [new_import])
H A Dfix_print.py18 from .. import pytree namespace
58 if args and args[0] == pytree.Leaf(token.RIGHTSHIFT, ">>"):
80 n_argument = pytree.Node(self.syms.argument,
82 pytree.Leaf(token.EQUAL, "="),
H A Dfix_raise.py26 from .. import pytree namespace
62 new = pytree.Node(syms.raise_stmt, [Name("raise"), exc])
84 new = pytree.Node(syms.simple_stmt, [Name("raise")] + with_tb)
88 return pytree.Node(syms.raise_stmt,
H A Dfix_ws_comma.py8 from .. import pytree namespace
20 COMMA = pytree.Leaf(token.COMMA, ",")
21 COLON = pytree.Leaf(token.COLON, ":")
H A Dfix_tuple_params.py22 from .. import pytree namespace
28 return isinstance(stmt, pytree.Node) and \
62 end = pytree.Leaf(token.INDENT, "")
75 new_lines.append(pytree.Node(syms.simple_stmt,
131 new = pytree.Node(syms.power,
H A Dfix_apply.py9 from .. import pytree namespace
59 l_newargs = [pytree.Leaf(token.STAR, "*"), args]
62 pytree.Leaf(token.DOUBLESTAR, "**"),
67 #new = pytree.Node(syms.power, (func, ArgList(l_newargs)))
H A Dfix_except.py25 from .. import pytree namespace
72 if isinstance(stmt, pytree.Node):
93 return pytree.Node(node.type, children)
H A Dfix_ne.py7 from .. import pytree namespace
22 new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix)
H A Dfix_throw.py11 from .. import pytree namespace
54 throw_args.replace(pytree.Node(syms.power, with_tb))
H A Dfix_zip.py12 from ..pytree import Node
H A Dfix_filter.py18 from ..pytree import Node
H A Dfix_map.py27 from ..pytree import Node

Completed in 7 milliseconds