Lines Matching full:children
31 self._AssertNodeType('COMMENT', node.children[0])
32 node_value = node.children[0].value
52 expr = tree.children[0].children[0]
53 # Check that the expected node is still expr_stmt, but now it has 4 children
56 self.assertEqual(4, len(expr.children))
57 comment_node = expr.children[3]
69 # The comment should've been added to the root's children (now 4, including
71 self.assertEqual(4, len(tree.children))
72 comment_node = tree.children[1]
86 self.assertEqual(4, len(tree.children))
87 self._AssertNodeIsComment(tree.children[1])
101 if_suite = tree.children[0].children[3]
102 self._AssertNodeType('NEWLINE', if_suite.children[0])
103 self._AssertNodeIsComment(if_suite.children[1])
117 if_suite = tree.children[0].children[3]
118 self._AssertNodeType('DEDENT', if_suite.children[-1])
119 self._AssertNodeIsComment(if_suite.children[-2])
132 sep_comment_node = tree.children[1]
135 expr = tree.children[2].children[0]
136 inline_comment_node = expr.children[-1]
150 sep_comment_node = tree.children[-2]
153 expr = tree.children[1].children[0]
154 inline_comment_node = expr.children[-1]
168 self._AssertNodeIsComment(tree.children[1])
169 if_suite = tree.children[0].children[3]
170 self._AssertNodeType('DEDENT', if_suite.children[-1])
183 if_suite = tree.children[0].children[3]
186 self._AssertNodeIsComment(if_suite.children[-2])
187 self._AssertNodeType('DEDENT', if_suite.children[-1])
203 if_suite = tree.children[0].children[3]
206 self._AssertNodeIsComment(if_suite.children[-2])
207 self._AssertNodeType('DEDENT', if_suite.children[-1])
223 self._AssertNodeIsComment(tree.children[1], '# comment 0')
227 self._AssertNodeIsComment(if_suite_1.children[-2], '# comment 1')
228 self._AssertNodeType('DEDENT', if_suite_1.children[-1])
233 self._AssertNodeIsComment(if_suite_2.children[-2], '# comment 2')
234 self._AssertNodeType('DEDENT', if_suite_2.children[-1])
248 class_suite = tree.children[0].children[3]
249 another_comment = class_suite.children[-2]
254 funcdef = class_suite.children[3]
255 toplevel_comment = funcdef.children[0]
270 funcdef = tree.children[0]
271 block_comment_1 = funcdef.children[0]
274 block_comment_2 = funcdef.children[1]
293 classdef = tree.children[0]
294 class_suite = classdef.children[6]
295 qux_comment = class_suite.children[1]
298 interim_comment = class_suite.children[4]
310 comment = trailer.children[1]
324 self._AssertNodeIsComment(trailer.children[1], '# com 1')
327 self._AssertNodeIsComment(arglist.children[2], '# com 2')
330 self._AssertNodeIsComment(arith_expr.children[-1], '# com 3')