summaryrefslogtreecommitdiff
path: root/ast.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 /ast.c
parent75d2e1cebdafd565d26b450859e4552ad757e66a (diff)
Add block expressions
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index 6fc66ff..4f38b19 100644
--- a/ast.c
+++ b/ast.c
@@ -387,6 +387,16 @@ ast_expression_new_new (ast_type_spec_t *type,
}
ast_expression_t *
+ast_expression_new_block (ast_expression_t *body)
+{
+ ast_expression_t *expr = expression_new (AST_BLOCK_EXPRESSION);
+
+ expr->block.body = body;
+
+ return expr;
+}
+
+ast_expression_t *
ast_expression_new_dot (ast_expression_t *left,
const char *name)
{