aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/expr.c b/expr.c
index 1fe280c..1423248 100644
--- a/expr.c
+++ b/expr.c
@@ -688,6 +688,12 @@ primaryexpr(struct scope *s)
}
next();
break;
+ case TTRUE:
+ case TFALSE:
+ e = mkexpr(EXPRCONST, &typebool, NULL);
+ e->u.constant.u = tok.kind == TTRUE;
+ next();
+ break;
case TLPAREN:
next();
e = expr(s);