summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2007-09-05 03:34:33 -0400
committerSøren Sandmann <sandmann@redhat.com>2007-09-05 03:34:33 -0400
commitaed71a29c2b1df498d2fa998c556be71acc7b5b9 (patch)
tree464e53a926efb1cd14a75fe221355b2c64b180e6 /ast.c
parentaab51ea15f4747bc9ed02ef0070f709ee9772829 (diff)
Add typedefs
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index 86d219e..4de6be3 100644
--- a/ast.c
+++ b/ast.c
@@ -479,6 +479,18 @@ ast_definition_new_variable (const char *name,
return definition;
}
+ast_definition_t *
+ast_definition_new_type (const char *name,
+ ast_type_spec_t *type_spec)
+{
+ ast_definition_t *definition = definition_new (AST_TYPE_DEFINITION);
+
+ definition->type.name = g_strdup (name);
+ definition->type.type_spec = type_spec;
+
+ return definition;
+}
+
ast_program_t *
ast_program_new (ast_statement_t *statement)
{