summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ast.h b/ast.h
index e5354ae..6b7c3d5 100644
--- a/ast.h
+++ b/ast.h
@@ -30,7 +30,7 @@ struct var_decl_node {
struct lval_node {
enum {
LVAL_VAR_DECL,
- LVAL_VAR_USE,
+ LVAL_VAR_REF,
} type;
union {
struct var_ref_node _var_ref;
@@ -46,13 +46,14 @@ struct assign_node {
struct expr_node {
enum {
- EXPR_EMPTY,
EXPR_INT_LIT,
EXPR_VAR_REF,
+ EXPR_ASSIGN,
} type;
union {
struct int_lit_node _int_lit;
struct var_ref_node _var_ref;
+ struct assign_node _assign;
} as;
};
@@ -73,6 +74,7 @@ struct return_node {
struct stmt_node {
enum {
+ STMT_EMPTY,
STMT_EXPR,
STMT_VAR_DECL,
STMT_RETURN,