summaryrefslogtreecommitdiff
path: root/switch.c
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2007-12-31 17:21:42 -0500
committerSøren Sandmann <sandmann@redhat.com>2007-12-31 17:21:42 -0500
commit63c6facbf1cee7df75ac83e32ccabe736f266592 (patch)
tree8e89ae48a48faf74238e7bc3b99252095d24c114 /switch.c
parent75d2e1cebdafd565d26b450859e4552ad757e66a (diff)
Add block expressions
Diffstat (limited to 'switch.c')
-rw-r--r--switch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/switch.c b/switch.c
index 46c9afc..b6d0740 100644
--- a/switch.c
+++ b/switch.c
@@ -67,6 +67,11 @@ constant_expression (ast_expression_t *expr,
/* FIXME: It might actually be useful to allow this */
return FALSE;
break;
+
+ case AST_BLOCK_EXPRESSION:
+ if (!constant_expression (expr->block.body, value))
+ return FALSE;
+ break;
case AST_UNARY_EXPRESSION:
if (!constant_expression (expr->unary.expr, &result))