diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-01-03 00:08:27 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-01-03 00:08:27 +0200 |
commit | fad8df848092d7f35e95c3b70b5917593df84952 (patch) | |
tree | 7300189cfd953b2571237e8e2a0fd556e1921633 /src/eval.h | |
parent | c837b2bb4ea71cedb434260b11c9f356e8b34e2d (diff) |
Diffstat (limited to 'src/eval.h')
-rw-r--r-- | src/eval.h | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -2,17 +2,38 @@ #define EVAL_H #include "parser.h" +#include "hashtbl.h" typedef struct eval *eval_t; +// struct symdata { +// enum symbol_type { +// SYMBOL_VALUE, +// SYMBOL_FUNC, +// SYMBOL_FUNC_BUILTIN +// } type; +// +// union { +// value_t value; +// ast_t func; +// builtin_func_t builtin; +// }; +// }; +// +// struct symtbl { +// hashtbl_t table; +// struct symtbl *parent; +// }; + struct eval { - // symtbl_t root; - // symtbl_t *cur; + // struct symtbl root; + // struct symtbl *cur; + // ... }; // TODO: add options for the evaluation eval_t eval_create(); void eval_destroy(eval_t eval); -int eval_ast(eval_t eval, parser_t ast); +int eval_ast(eval_t eval, ast_t *ast); #endif |