Lines Matching refs:syms

9 from .pygram import python_symbols as syms
18 return Node(syms.argument,
35 return Node(syms.atom,
44 return [obj, Node(syms.trailer, [Dot(), attr])]
56 node = Node(syms.trailer, [lparen.clone(), rparen.clone()])
58 node.insert_child(1, Node(syms.arglist, args))
63 node = Node(syms.power, [func_name, ArgList(args)])
81 return Node(syms.trailer, [Leaf(token.LBRACE, u"["),
106 inner_args.append(Node(syms.comp_if, [if_leaf, test]))
107 inner = Node(syms.listmaker, [xp, Node(syms.comp_for, inner_args)])
108 return Node(syms.atom,
128 Node(syms.import_as_names, name_leafs)]
129 imp = Node(syms.import_from, children)
164 return Node(syms.atom, [LParen(), node, RParen()])
236 if parent.type in (syms.funcdef, syms.classdef):
238 if parent.type == syms.expr_stmt and parent.children[0] is node:
241 if parent.type == syms.parameters or \
242 (parent.type == syms.typedargslist and (
253 if node.type == syms.suite and len(node.children) > 2:
265 if node.type == syms.suite:
269 suite = Node(syms.suite, [node])
276 while node.type != syms.file_input:
292 return node.type in (syms.import_name, syms.import_from)
298 return (node.type == syms.simple_stmt and node.children and
322 if (node.type == syms.simple_stmt and node.children and
328 import_ = Node(syms.import_name, [
336 root.insert_child(insert_pos, Node(syms.simple_stmt, children))
339 _def_syms = set([syms.classdef, syms.funcdef])
347 if child.type == syms.for_stmt:
352 elif child.type in (syms.if_stmt, syms.while_stmt):
355 elif child.type == syms.try_stmt:
369 elif child.type == syms.simple_stmt:
371 elif child.type == syms.expr_stmt:
382 _block_syms = set([syms.funcdef, syms.classdef, syms.trailer])
398 if node.type == syms.import_name and not package:
400 if imp.type == syms.dotted_as_names:
402 if child.type == syms.dotted_as_name:
407 elif imp.type == syms.dotted_as_name:
413 elif node.type == syms.import_from:
422 elif n.type == syms.import_as_names and _find(name, n):
424 elif n.type == syms.import_as_name: