summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorCarson Fleming <[email protected]>2026-03-26 16:01:27 -0700
committerCarson Fleming <[email protected]>2026-03-26 16:01:27 -0700
commit2e4f713ede25fb6147571858779fde542144c76f (patch)
treeff7989e0f5a985d7368feeb1d0f0a26142c5d7da /ast.h
parent7d9fb2c733c8c64f6f74eefa0eea35b36be102cd (diff)
downloadccc-2e4f713ede25fb6147571858779fde542144c76f.tar.gz
start codegen work
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ast.h b/ast.h
index c82f089..b058487 100644
--- a/ast.h
+++ b/ast.h
@@ -37,13 +37,9 @@ struct int_lit_node {
struct expr_node {
enum {
EXPR_EMPTY,
- EXPR_VAR_DECL,
- EXPR_RETURN,
EXPR_INT_LIT,
} type;
union {
- struct var_decl_node _var_decl;
- struct return_node _return;
struct int_lit_node _int_lit;
} as;
};
@@ -51,10 +47,14 @@ struct expr_node {
struct stmt_node {
enum {
STMT_EXPR,
+ STMT_VAR_DECL,
+ STMT_RETURN,
STMT_GROUP,
} type;
union {
struct expr_node _expr;
+ struct var_decl_node _var_decl;
+ struct return_node _return;
struct group_node _group;
} as;