summaryrefslogtreecommitdiff
path: root/src/runner
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-08 02:16:05 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-08 02:16:05 +0330
commit1460877dca47ab740eef3a5529cd30008e1a27a5 (patch)
treed02752f617157d0cfd3d037bd69280e0acd094b3 /src/runner
parent1b8c8fb55ae5a2bc48951b65b01eb83d75ab4715 (diff)
add const check
fix some bugs
Diffstat (limited to 'src/runner')
-rw-r--r--src/runner/runner.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c
index 902dd93..23cbca0 100644
--- a/src/runner/runner.c
+++ b/src/runner/runner.c
@@ -63,6 +63,11 @@ AstTree *runAstTreeFunction(AstTreeFunction *function) {
}
}
continue;
+ case AST_TREE_TOKEN_VARIABLE_DEFINE: {
+ AstTreeVariable *variable = expr.metadata;
+ variable->value = calcAstTreeValue(variable->value);
+ }
+ continue;
case AST_TREE_TOKEN_OPERATOR_SUM:
case AST_TREE_TOKEN_FUNCTION:
case AST_TREE_TOKEN_TYPE_TYPE:
@@ -70,7 +75,6 @@ AstTree *runAstTreeFunction(AstTreeFunction *function) {
case AST_TREE_TOKEN_TYPE_VOID:
case AST_TREE_TOKEN_TYPE_U64:
case AST_TREE_TOKEN_VARIABLE:
- case AST_TREE_TOKEN_VARIABLE_DEFINE:
case AST_TREE_TOKEN_VALUE_U64:
case AST_TREE_TOKEN_NONE:
}