blob: ac36e84caeffe3f48a4b4436978658e3614d2ebd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#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 runnerVariablePush(RunnerVariables *variables,AstTreeVariable *variable);
void runnerVariableSetValue(RunnerVariablePages *pages,AstTreeVariable *variable,AstTree *value);
AstTree* runnerVariableGetValue(RunnerVariablePages *pages,AstTreeVariable *variable);
bool runAstTree(AstTreeRoot *root);
AstTree *runAstTreeFunction(AstTree *tree, AstTree **arguments,
size_t arguments_size,RunnerVariablePages *pages);
AstTree *calcAstTreeValue(AstTree *tree,RunnerVariablePages *pages);
AstTree *deepCopyAstTree(AstTree *tree);
|