Lines Matching defs:child
44 static void addChild (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child);
51 static void setChild (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void * child);
144 addChild (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child)
149 if (child == NULL)
154 if (child->isNilNode(child) == ANTLR3_TRUE)
156 if (child->children != NULL && child->children == tree->children)
160 ANTLR3_FPRINTF(stderr, "ANTLR3: An attempt was made to add a child list to itself!\n");
166 if (child->children != NULL)
173 // copy in the child's children pointer as the child is
176 tree->children = child->children;
177 child->children = NULL;
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);
214 tree->children->add(tree->children, child, (void (ANTLR3_CDECL *)(void *))child->free);
236 setChild (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void * child)
242 tree->children->set(tree->children, i, child, NULL, ANTLR3_FALSE);
335 /// For huge child lists, inserting children can force walking rest of
336 /// children to set their child index; could be slow.
390 pANTLR3_BASE_TREE child;
397 child = (pANTLR3_BASE_TREE) newChildren->get(newChildren, j);
398 parent->children->set(parent->children, i, child, NULL, ANTLR3_FALSE);
399 child->setParent(child, parent);
400 child->setChildIndex(child, i);
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
467 /// supplied tree, starting with the child at the supplied index.
481 pANTLR3_BASE_TREE child;
483 child = tree->getChild(tree, c);
485 child->setChildIndex(child, c);
486 child->setParent(child, tree);