aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-05 00:57:20 -0500
committerMustafa Quraish <[email protected]>2022-02-05 08:56:15 -0500
commit24dd666121e2786efb82854b05aa71d759e04ee6 (patch)
tree4420eda5e1cde0bfe7dfe8f4b160212d59ceeca3 /src/ast.c
parentAdd `void` type and allow void* to be assigned to other ptr types (diff)
downloadcup-24dd666121e2786efb82854b05aa71d759e04ee6.tar.xz
cup-24dd666121e2786efb82854b05aa71d759e04ee6.zip
Add ability to initialize global variables
The code to initialize them is put right before calling `main()`
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ast.c b/src/ast.c
index 62b8b6c..24885c2 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -199,7 +199,7 @@ void dump_func(Node *node, int depth)
printf("[[%lld]]", node->func.args[i].offset);
}
printf(")");
- if (node->func.return_type->type != TYPE_NONE) {
+ if (node->func.return_type->type != TYPE_VOID) {
// FIXME: Print return type properly
printf(" -> %s", type_to_str(node->func.return_type));
}