/third_party/python/Lib/lib2to3/tests/ |
H A D | test_pytree.py | 4 """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 D | support.py | 11 from lib2to3 import pytree, refactor namespace 20 driver = pgen2_driver.Driver(grammar, convert=pytree.convert) 23 convert=pytree.convert
|
H A D | pytree_idempotency.py | 20 from .. import pytree namespace 28 dr = driver.Driver(gr, convert=pytree.convert)
|
H A D | test_util.py | 7 from lib2to3.pytree import Node, Leaf
|
/third_party/python/Lib/lib2to3/ |
H A D | patcomp.py | 8 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 D | refactor.py | 27 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 D | btm_matcher.py | 14 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 D | btm_utils.py | 3 from . import pytree namespace 148 if (isinstance(node.children[0], pytree.Leaf) and 152 if ((isinstance(node.children[0], pytree.Leaf) and
|
H A D | pygram.py | 12 from . import pytree namespace
|
H A D | fixer_util.py | 6 from .pytree import Leaf, Node
|
/third_party/python/Lib/lib2to3/fixes/ |
H A D | fix_set_literal.py | 7 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 D | fix_has_key.py | 33 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 D | fix_dict.py | 31 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 D | fix_exitfunc.py | 7 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 D | fix_print.py | 18 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 D | fix_raise.py | 26 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 D | fix_ws_comma.py | 8 from .. import pytree namespace 20 COMMA = pytree.Leaf(token.COMMA, ",") 21 COLON = pytree.Leaf(token.COLON, ":")
|
H A D | fix_tuple_params.py | 22 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 D | fix_apply.py | 9 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 D | fix_except.py | 25 from .. import pytree namespace 72 if isinstance(stmt, pytree.Node): 93 return pytree.Node(node.type, children)
|
H A D | fix_ne.py | 7 from .. import pytree namespace 22 new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix)
|
H A D | fix_throw.py | 11 from .. import pytree namespace 54 throw_args.replace(pytree.Node(syms.power, with_tb))
|
H A D | fix_zip.py | 12 from ..pytree import Node
|
H A D | fix_filter.py | 18 from ..pytree import Node
|
H A D | fix_map.py | 27 from ..pytree import Node
|