summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/ast.h b/ast.h
index af35d45..0c5c741 100644
--- a/ast.h
+++ b/ast.h
@@ -31,7 +31,7 @@ struct str_lit_node {
};
struct var_ref_node {
- struct var_def* def_ref;
+ const struct var_def* def_ref;
};
struct decl_node {
@@ -51,8 +51,7 @@ struct assign_node {
};
struct call_node {
- /* TODO: function pointers */
- struct fn_decl_node* fn_ref; /* borrowed */
+ struct expr_node* expr;
struct expr_list_node* args;
};
@@ -126,15 +125,15 @@ struct arg_decl_node {
};
struct fn_decl_node {
- struct type return_type;
- const char* name;
+ struct type type;
+ char* name; /* TODO: why is this borrowed? who owns it? */
struct arg_decl_node* args;
struct group_node* body;
struct scope* scope;
};
struct return_node {
- struct fn_decl_node* fn_ref;
+ struct var_def* fn_def;
struct expr_list_node* ret_val; /* null to return void */
};