summaryrefslogtreecommitdiff
path: root/src/runner/runner.c
diff options
context:
space:
mode:
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;