Commit 4d2bb3cb authored by dearblue's avatar dearblue

Compositing `NODE_DSTR` and `NODE_STR`

parent 8ead6da9
......@@ -893,6 +893,21 @@ concat_string(parser_state *p, node *a, node *b)
}
}
}
else if (string_node_p(b)) {
/* a == NODE_DSTR && b == NODE_STR */
node *c;
for (c = a; c->cdr != NULL; c = c->cdr) ;
if (string_node_p(c->car)) {
/* a->[..., NODE_STR] && b == NODE_STR */
composite_string_node(p, c->car->cdr, b->cdr);
cons_free(b);
return a;
}
push(a, b);
return a;
}
return new_dstr(p, list2(a, b));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment