aboutsummaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-24 02:36:58 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-24 02:37:38 +0330
commitffe049371a64e0b41fdc777106f768b16b2cd9b2 (patch)
treea5aec2b2b038bfd8f62f218eebfd23413225b28e /src/compiler
parent547074407aa154cc82ecff647603254f2eaf46f6 (diff)
fix some unintended stuff
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/ast-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c
index 628784a..a4159d1 100644
--- a/src/compiler/ast-tree.c
+++ b/src/compiler/ast-tree.c
@@ -5842,7 +5842,7 @@ bool setTypesIf(AstTree *tree, AstTreeSetTypesHelper helper,
return false;
}
- if (isConst(metadata->condition)) {
+ if (metadata->condition->token == AST_TREE_TOKEN_KEYWORD_COMPTIME) {
AstTree *condition = getValue(metadata->condition, true);
AstTree *result;
bool condi = *(AstTreeBool *)condition->metadata;
@@ -5913,7 +5913,7 @@ bool setTypesWhile(AstTree *tree, AstTreeSetTypesHelper _helper,
return false;
}
- if (isConst(metadata->condition)) {
+ if (metadata->condition->token == AST_TREE_TOKEN_KEYWORD_COMPTIME) {
AstTree *condition = getValue(metadata->condition, true);
bool condi = *(AstTreeBool *)condition->metadata;
astTreeDelete(condition);