summaryrefslogtreecommitdiff
path: root/src/runner/runner.c
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 14:44:16 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 14:44:16 +0330
commit62b7af496f2c694ff5361cf21042bbe14f969c64 (patch)
tree4c9b32af2d2baa49ad9941fc73a90133e1c27a77 /src/runner/runner.c
parent1f73f7e22c207fa72391253e21332e02d055bd72 (diff)
add more type stuff
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r--src/runner/runner.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c
index c6a8bf0..984af3f 100644
--- a/src/runner/runner.c
+++ b/src/runner/runner.c
@@ -30,6 +30,11 @@ void runnerVariableSetValue(AstTreeVariable *variable, AstTree *value) {
if (variable->isConst) {
UNREACHABLE;
}
+ runnerVariableSetValueWihtoutConstCheck(variable, value);
+}
+
+void runnerVariableSetValueWihtoutConstCheck(AstTreeVariable *variable,
+ AstTree *value) {
if (variable->value != NULL) {
astTreeDelete(variable->value);
}
@@ -71,7 +76,7 @@ AstTree *runAstTreeFunction(AstTree *tree, AstTreeFunctionCallParam *arguments,
AstTreeFunctionCallParam param = arguments[i];
AstTreeVariable *arg = function->arguments.data[i];
AstTree *value = runExpression(param.value, &shouldRet, false);
- runnerVariableSetValue(arg, value);
+ runnerVariableSetValueWihtoutConstCheck(arg, value);
}
shouldRet = false;