aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ast.h b/src/ast.h
index af7ef65..0c8f70e 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -26,8 +26,9 @@
F(OP_GT, ">") \
F(OP_GEQ, ">=") \
F(OP_ASSIGN, "=") \
- F(OP_MEMBER, ".") \
+ F(OP_MEMBER, ".") \
F(AST_LITERAL, "literal") \
+ F(AST_CONSTANT, "constant integer") \
F(AST_FUNCCALL, "Function call") \
F(AST_CONDITIONAL, "conditional expression") \
F(AST_IF, "if statement") \
@@ -150,6 +151,11 @@ typedef struct ast_node {
Node *expr;
bool is_ptr;
} member;
+
+ struct {
+ char *name;
+ Node *int_literal;
+ } constant;
};
} Node;