- p = lastsib = parent->first_child;
-
- while (p->next_sibling) {
- p = p->next_sibling;
- lastsib = p; // finds the last sibling
- if (p->binding == node->binding) {
- // found an identical binding..
- assert(node->chain && p->chain);
- delete node; // kill the one we aren't using
- printf("using existing node\n");
- break;
+ a = parent->first_child;
+ last = a;
+ b = node;
+ while (a->first_child) {
+ last = a;
+ if (a->binding != b->binding) {
+ a = a->next_sibling;
+ } else {
+ tmp = b;
+ b = b->first_child;
+ delete tmp;
+ a = a->first_child;