ref: a2edfce45a0f781595bb690f1765d7888e45e043
parent: e4299d409e5f62e73346227fc9c10ed63d078000
author: Ori Bernstein <[email protected]>
date: Wed Dec 25 13:43:16 EST 2013
Improve type naming. types aren't good enough.
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -345,9 +345,14 @@
p = buf;
end = buf + sz;
- p += snprintf(p, end - p, "$%d", (int)t->type);
- for (i = 0; i < t->nsub; i++)
- p += tidappend(p, end - p, t->sub[i]);
+ p += snprintf(p, end - p, "$%d", t->tid);
+ if (t->type == Tyname) {
+ for (i = 0; i < t->narg; i++)
+ p += tidappend(p, end - p, t->arg[i]);
+ } else {
+ for (i = 0; i < t->nsub; i++)
+ p += tidappend(p, end - p, t->sub[i]);
+ }
return p - buf;
}