Lines Matching refs:children
45 children = () # Tuple of subnodes
109 for ch in self.parent.children:
111 assert not found, (self.parent.children, self, new)
117 assert found, (self.children, self, new)
119 self.parent.children = l_children
128 if not node.children:
130 node = node.children[0]
141 parent's children before it was removed.
144 for i, node in enumerate(self.parent.children):
147 del self.parent.children[i]
154 The node immediately following the invocant in their parent's children
161 for i, child in enumerate(self.parent.children):
164 return self.parent.children[i+1]
171 The node immediately preceding the invocant in their parent's children
178 for i, child in enumerate(self.parent.children):
182 return self.parent.children[i-1]
185 for child in self.children:
211 def __init__(self,type, children,
221 As a side effect, the parent pointers of the children are updated.
225 self.children = list(children)
226 for ch in self.children:
240 self.children)
248 return "".join(map(str, self.children))
255 return (self.type, self.children) == (other.type, other.children)
259 return Node(self.type, [ch.clone() for ch in self.children],
264 for child in self.children:
271 for child in self.children:
279 if not self.children:
281 return self.children[0].prefix
285 if self.children:
286 self.children[0].prefix = prefix
290 Equivalent to 'node.children[i] = child'. This method also sets the
294 self.children[i].parent = None
295 self.children[i] = child
300 Equivalent to 'node.children.insert(i, child)'. This method also sets
304 self.children.insert(i, child)
309 Equivalent to 'node.children.append(child)'. This method also sets the
313 self.children.append(child)
403 type, value, context, children = raw_node
404 if children or type in gr.number2symbol:
407 if len(children) == 1:
408 return children[0]
409 return Node(type, children, context=context)
530 Match the pattern's content to the node's children.
558 must match the node's children exactly. If the content is
579 Match the pattern's content to the node's children.
591 for c, r in generate_matches(self.content, node.children):
592 if c == len(node.children):
597 if len(self.content) != len(node.children):
599 for subpattern, child in zip(self.content, node.children):