summaryrefslogtreecommitdiff
path: root/src/runner/runner.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-03-27 02:25:44 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-03-27 02:25:44 +0330
commit8712565a385fcba4734f4d89ffb3aa40a30b4120 (patch)
tree6ad6f3feddcfd5653df4ec50e3754eb6ec86e737 /src/runner/runner.h
parent011414b35bdb4e7e1e819d12e9fb2f37f91b2682 (diff)
replaced old variable system with new one in vm
Diffstat (limited to 'src/runner/runner.h')
-rw-r--r--src/runner/runner.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/runner/runner.h b/src/runner/runner.h
index fd64d1e..efb3eb8 100644
--- a/src/runner/runner.h
+++ b/src/runner/runner.h
@@ -3,36 +3,11 @@
#include "compiler/ast-tree.h"
#include <stdint.h>
-typedef struct RunnerVariable {
- AstTreeVariable *variable;
- AstTree *value;
-} RunnerVariable;
-
-typedef struct RunnerVariables {
- RunnerVariable **data;
- size_t size;
-} RunnerVariables;
-
-typedef struct RunnerVariablePages {
- RunnerVariables **data;
- size_t size;
-} RunnerVariablePages;
-
-void runnerVariablesDelete(RunnerVariables *variables);
-
-void runnerVariablePush(RunnerVariables *variables, AstTreeVariable *variable);
-void runnerVariableSetValue(RunnerVariablePages *pages,
- AstTreeVariable *variable, AstTree *value);
-AstTree *runnerVariableGetValue(RunnerVariablePages *pages,
- AstTreeVariable *variable);
-
-RunnerVariablePages initRootPages();
-void destroyRootPages(RunnerVariablePages pages);
+void runnerVariableSetValue(AstTreeVariable *variable,AstTree *value);
bool runAstTree(AstTreeRoot *root);
AstTree *runAstTreeFunction(AstTree *tree, AstTreeFunctionCallParam *arguments,
- size_t arguments_size, RunnerVariablePages *pages);
+ size_t arguments_size);
-AstTree *runExpression(AstTree *expr, RunnerVariablePages *pages,
- bool *shouldRet);
+AstTree *runExpression(AstTree *expr, bool *shouldRet);