diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-26 01:21:12 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-26 01:21:12 +0330 |
commit | 85bfc724dd2bdaa2259512c1b8ab21f7dfeca8f1 (patch) | |
tree | 0b9075ba9bf70aca9cdf36e5d909b161460b19a8 /src/runner | |
parent | 6edcfb23ffd49e937395b710f7c6213b2c0d93cf (diff) |
clean up
Diffstat (limited to 'src/runner')
-rw-r--r-- | src/runner/runner.c | 4 | ||||
-rw-r--r-- | src/runner/runner.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index 2e8c347..f33f056 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -2,8 +2,8 @@ #include "compiler/ast-tree.h" #include "utils/log.h" #include "utils/memory.h" +#include "utils/string.h" #include <stdio.h> -#include <string.h> #define doOperation(op0, op1, operator, originalType, type) \ *((originalType *)(op0)->metadata) = \ @@ -53,7 +53,7 @@ bool runAstTree(AstTreeRoots roots) { AstTreeVariable *variable = root->variables.data[i]; size_t name_size = variable->name_end - variable->name_begin; if (name_size == MAIN_STR_SIZE && - strncmp(variable->name_begin, MAIN_STR, MAIN_STR_SIZE) == 0 && + strnEquals(variable->name_begin, MAIN_STR, MAIN_STR_SIZE) && variable->type->token == AST_TREE_TOKEN_TYPE_FUNCTION) { if (mainVariable != NULL) { printLog("Too many main variables"); diff --git a/src/runner/runner.h b/src/runner/runner.h index 12ee241..4de6fbe 100644 --- a/src/runner/runner.h +++ b/src/runner/runner.h @@ -1,7 +1,6 @@ #pragma once #include "compiler/ast-tree.h" -#include <stdint.h> void runnerVariableSetValue(AstTreeVariable *variable, AstTree *value); void runnerVariableSetValueWihtoutConstCheck(AstTreeVariable *variable, |