blob: 6fb0b3697fde4ff9d5e4e02140bf2ef1b5c656c6 (
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
32
33
34
35
|
#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 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);
bool runAstTree(AstTreeRoot *root);
AstTree *runAstTreeFunction(AstTree *tree, AstTree **arguments,
size_t arguments_size,RunnerVariablePages *pages);
AstTree* runExpression(AstTree *expr,RunnerVariablePages *pages);
|