aboutsummaryrefslogtreecommitdiff
path: root/src/eval.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.h')
-rw-r--r--src/eval.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/eval.h b/src/eval.h
index fc7b8ad..8b70a06 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -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