Lines Matching refs:children
75 tree->children = NULL;
101 if (tree->children != NULL)
103 cs = tree->children->size(tree->children);
106 t = (pANTLR3_BASE_TREE) (tree->children->get(tree->children, i));
121 if ( tree->children == NULL
122 || i >= tree->children->size(tree->children))
126 return tree->children->get(tree->children, i);
133 if (tree->children == NULL)
139 return tree->children->size(tree->children);
156 if (child->children != NULL && child->children == tree->children)
164 // Add all of the children's children to this list
166 if (child->children != NULL)
168 if (tree->children == NULL)
173 // copy in the child's children pointer as the child is
176 tree->children = child->children;
177 child->children = NULL;
183 // Need to copy the children
185 n = child->children->size(child->children);
190 entry = child->children->get(child->children, i);
196 tree->children->add(tree->children, entry, (void (ANTLR3_CDECL *) (void *))child->free);
204 // Tree we are adding is not a Nil and might have children to copy
206 if (tree->children == NULL)
208 // No children in the tree we are adding to, so create a new list on
214 tree->children->add(tree->children, child, (void (ANTLR3_CDECL *)(void *))child->free);
219 /// Add all elements of the supplied list as children of this node
238 if (tree->children == NULL)
242 tree->children->set(tree->children, i, child, NULL, ANTLR3_FALSE);
248 if ( tree->children == NULL)
253 return tree->children->remove(tree->children, i);
265 if (tree->children != NULL)
267 s = tree->children->size (tree->children);
274 t = (pANTLR3_BASE_TREE) tree->children->get(tree->children, i);
295 if (tree->children == NULL || tree->children->size(tree->children) == 0)
310 if (tree->children != NULL)
312 n = tree->children->size(tree->children);
316 t = (pANTLR3_BASE_TREE) tree->children->get(tree->children, i);
333 /// Delete children from start to stop and replace with t even if t is
334 /// a list (nil-root tree). Num of children can increase or decrease.
335 /// For huge child lists, inserting children can force walking rest of
336 /// children to set their child index; could be slow.
352 if (parent->children == NULL)
354 ANTLR3_FPRINTF(stderr, "replaceChildren call: Indexes are invalid; no children in list for %s", parent->getText(parent)->chars);
358 // Either use the existing list of children in the supplied nil node, or build a vector of the
363 newChildren = newTree->children;
398 parent->children->set(parent->children, i, child, NULL, ANTLR3_FALSE);
412 parent->children->set(parent->children, startChildIndex + j, newChildren->get(newChildren, j), NULL, ANTLR3_FALSE);
421 parent->children->remove(parent->children, indexToDelete);
435 parent->children->set(parent->children, startChildIndex + j, newChildren->get(newChildren, j), NULL, ANTLR3_FALSE);
442 parent->children->add(parent->children, newChildren->get(newChildren, j), NULL);
457 /// Set the parent and child indexes for all children of the
466 /// Set the parent and child indexes for some of the children of the
475 count = tree->getChildCount(tree); // How many children do we have