Lines Matching full:suite
9 we normalize those into having a suite.
29 1) clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
33 if node.type == syms.suite:
46 """ one-line classes don't get a suite in the parse tree so we add
50 if node.type == syms.suite:
54 # !%@#! oneliners have no suite node, we have to fake one up
59 raise ValueError("No class suite and no ':'!")
61 # move everything into a suite node
62 suite = Node(syms.suite, [])
65 suite.append_child(move_node.clone())
67 cls_node.append_child(suite)
68 node = suite
101 # find the suite node (Mmm, sweet nodes)
103 if node.type == syms.suite:
106 raise ValueError("No class suite!")
123 def fixup_indent(suite): argument
125 Otherwise we get in trouble when removing __metaclass__ at suite start
127 kids = suite.children[::-1]
160 for suite, i, stmt in find_metas(node):
168 # Node(classdef, ['class', 'name', '(', arglist, ')', ':', suite])
172 # Node(classdef, ['class', 'name', '(', 'Parent', ')', ':', suite])
178 # Node(classdef, ['class', 'name', '(', ')', ':', suite])
183 # Node(classdef, ['class', 'name', ':', suite])
211 fixup_indent(suite)
213 # check for empty suite
214 if not suite.children:
216 suite.remove()
222 elif len(suite.children) > 1 and \
223 (suite.children[-2].type == token.INDENT and
224 suite.children[-1].type == token.DEDENT):
227 suite.insert_child(-1, pass_leaf)
228 suite.insert_child(-1, Leaf(token.NEWLINE, '\n'))