diff options
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 | 
