summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ast.h2
-rw-r--r--parser.c2
-rw-r--r--scope.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/ast.h b/ast.h
index bc23a1c..21a4e72 100644
--- a/ast.h
+++ b/ast.h
@@ -7,7 +7,7 @@ struct stmt_node;
struct expr_node;
struct type_ref_node {
- struct type type;
+ struct type_ref type;
};
struct int_lit_node {
diff --git a/parser.c b/parser.c
index 14bbbf5..28e36e3 100644
--- a/parser.c
+++ b/parser.c
@@ -79,7 +79,7 @@ static void parse_type_ref(struct type_ref_node* p_node) {
PARSER_PANIC("unknown type name: %s", tok.data.ident);
free(tok.data.ident);
- p_node->type = (struct type) {
+ p_node->type = (struct type_ref) {
.raw_type = type_def,
.ptr_level = 0,
};
diff --git a/scope.h b/scope.h
index 5761f54..09a1375 100644
--- a/scope.h
+++ b/scope.h
@@ -21,7 +21,7 @@ struct storage_location {
};
};
-struct type {
+struct type_ref {
const struct type_def* raw_type;
unsigned char ptr_level;
};
@@ -41,7 +41,7 @@ struct type_def {
};
struct var_def {
- const struct type* type;
+ const struct type_ref* type;
char* name;
struct storage_location loc;
const struct type_def* resolved_type;