diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-15 21:54:04 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-15 21:54:04 +0330 |
commit | cc12a3a946303ae89ce2076b3c17d5d35d7e864f (patch) | |
tree | 3429c081fecb65cf538b213e382016416dbca344 /src/runner/runner.c | |
parent | 52fac2c9232d39b3fe98438a47c22f985b260f58 (diff) |
add string
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r-- | src/runner/runner.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index a0bceed..9490d91 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -3,7 +3,6 @@ #include "utils/log.h" #include "utils/memory.h" #include <stdio.h> -#include <stdlib.h> #include <string.h> #define doOperation(op0, op1, operator, originalType, type) \ @@ -28,7 +27,6 @@ void runnerVariableSetValue(AstTreeVariable *variable, AstTree *value) { if (variable->isConst) { - *(u8 *)0 = 0; UNREACHABLE; } runnerVariableSetValueWihtoutConstCheck(variable, value); @@ -1185,11 +1183,11 @@ AstTree *runExpression(AstTree *expr, AstTreeScope *scope, bool *shouldRet, for (size_t i = 0; i < newMetadata->variables.size; ++i) { AstTreeVariable *member = newMetadata->variables.data[i]; if (!member->isConst) { - runnerVariableSetValue( - member, - newAstTree(AST_TREE_TOKEN_VALUE_UNDEFINED, NULL, - copyAstTree(member->type), variable->value->str_begin, - variable->value->str_end)); + runnerVariableSetValue(member, + newAstTree(AST_TREE_TOKEN_VALUE_UNDEFINED, + NULL, copyAstTree(member->type), + variable->value->str_begin, + variable->value->str_end)); } } |