summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-14 23:27:06 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-14 23:27:06 -0800
commitf5a1454387098fa3abb7bf95f4123e1fac85cb7d (patch)
treec5410430516ebf119d8139c8b599732cbd545d51 /parse/specialize.c
parent607b2662bc1093833bfea0c49236f098271cf348 (diff)
downloadmc-f5a1454387098fa3abb7bf95f4123e1fac85cb7d.tar.gz
Initial support for void as an expression.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 1414119..7a9eb70 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -180,12 +180,13 @@ static void fixup(Node *n)
case Nlit:
switch (n->lit.littype) {
case Lfunc: fixup(n->lit.fnval); break;
- case Lchr:
- case Lint:
- case Lflt:
- case Lstr:
- case Llbl:
- case Lbool: break;
+ case Lvoid: break;
+ case Lchr: break;
+ case Lint: break;
+ case Lflt: break;
+ case Lstr: break;
+ case Llbl: break;
+ case Lbool: break;
}
break;
case Nifstmt:
@@ -273,6 +274,7 @@ static Node *specializenode(Node *n, Htab *tsmap)
r->lit.littype = n->lit.littype;
r->lit.type = tysubst(n->expr.type, tsmap);
switch (n->lit.littype) {
+ case Lvoid: break;
case Lchr: r->lit.chrval = n->lit.chrval; break;
case Lint: r->lit.intval = n->lit.intval; break;
case Lflt: r->lit.fltval = n->lit.fltval; break;