Lines Matching +full:symbol +full:- +full:tree
10 import symbol
18 """Retrieve information from the parse tree of a source file.
33 def __init__(self, tree = None): argument
36 if tree:
37 self._extract_info(tree)
39 def _extract_info(self, tree): argument
41 if len(tree) == 2:
42 found, vars = match(DOCSTRING_STMT_PATTERN[1], tree[1])
44 found, vars = match(DOCSTRING_STMT_PATTERN, tree[3])
48 for node in tree[1:]:
52 if cstmt[0] == symbol.funcdef:
55 elif cstmt[0] == symbol.classdef:
89 def __init__(self, tree = None): argument
90 self._name = tree[2][1]
91 SuiteInfoBase.__init__(self, tree and tree[-1] or None)
95 def __init__(self, tree = None): argument
96 self._name = tree[2][1]
97 SuiteInfoBase.__init__(self, tree and tree[-1] or None)
107 def __init__(self, tree = None, name = "<string>"): argument
109 SuiteInfoBase.__init__(self, tree)
110 if tree:
111 found, vars = match(DOCSTRING_STMT_PATTERN, tree[1])
159 symbol.stmt,
160 (symbol.compound_stmt, ['compound'])
169 symbol.stmt,
170 (symbol.simple_stmt,
171 (symbol.small_stmt,
172 (symbol.expr_stmt,
173 (symbol.testlist,
174 (symbol.test,
175 (symbol.and_test,
176 (symbol.not_test,
177 (symbol.comparison,
178 (symbol.expr,
179 (symbol.xor_expr,
180 (symbol.and_expr,
181 (symbol.shift_expr,
182 (symbol.arith_expr,
183 (symbol.term,
184 (symbol.factor,
185 (symbol.power,
186 (symbol.atom,