summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2007-10-15 06:29:39 -0400
committerSøren Sandmann <sandmann@redhat.com>2007-10-15 06:29:39 -0400
commitddb1a006084dfd0b7e774d3e1895eede7ae6ea68 (patch)
tree3e56fb7789f5a50dbe9b6309d5ea48312e24f230 /ast.c
parent5f776d911013e029003defcebc894d74bb67644c (diff)
Add parsing of array types
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 dcbb961..ccbe65c 100644
--- a/ast.c
+++ b/ast.c
@@ -442,6 +442,16 @@ ast_type_spec_new_function (ast_type_spec_t *return_,
return type_spec;
}
+ast_type_spec_t *
+ast_type_spec_new_array (ast_type_spec_t *child)
+{
+ ast_type_spec_t *type_spec = ast_type_spec_new (AST_ARRAY_TYPE);
+
+ type_spec->array.child_type = child;
+
+ return type_spec;
+}
+
void
ast_type_spec_init_object (ast_type_spec_t *type_spec,
ast_class_definition_t *class)