Commit 8ead6da9 authored by dearblue's avatar dearblue

Compositing `NODE_STR` and `NODE_DSTR`

parent 25957421
......@@ -881,6 +881,17 @@ concat_string(parser_state *p, node *a, node *b)
cons_free(b);
return a;
}
else {
/* a == NODE_STR && b == NODE_DSTR */
if (string_node_p(b->cdr->car)) {
/* a == NODE_STR && b->[NODE_STR, ...] */
composite_string_node(p, a->cdr, b->cdr->car->cdr);
cons_free(b->cdr->car);
b->cdr->car = a;
return b;
}
}
}
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