diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-06 08:04:26 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-06 08:04:26 -0800 |
commit | e98f89c84ec0492a36e364ac32987e17296b33df (patch) | |
tree | 7a306f7a148cee12a0c8f216e347c548875e2e75 /src/main.c | |
parent | 6c1e4bbfe920feda675d8ea3a13281742d55c334 (diff) |
no obvious memory problems
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -78,21 +78,14 @@ int main(int argc, char **argv) { /* print(res); */ /* DONE: TEST NON-BUILTIN FUNCTIONS (stack frame) */ - lexer_t *lexer = init_lexer("(bind my_func (lambda (x y) (+ x " - "y))) (my_func (+ 3 4) 4) (+ 3 4)"); - printf("%ld\n", hash("my_func", 100)); - printf("%ld\n", hash("my_func", 100)); - printf("debug 1\n"); + lexer_t *lexer = init_lexer("(bind my_var 3) (bind hello (lambda (x y) (+ x " + "y))) (hello (+ my_var 4) 4) (+ my_var 4)"); parser_t *parser = init_parser(lexer); - printf("debug 2\n"); visitor_t *visitor = init_visitor(parser); - printf("debug 3\n"); ast_t *root = eval(visitor); - printf("debug 4\n"); print_root(root); - printf("debug 5\n"); - ast_t *res = root->subnodes[0]; - print(res); + /* ast_t *res = root->subnodes[0]; */ + /* print(res); */ /* lexer_t *lexer = init_lexer("((lambda (x y) (+ x y)) (+ 3 4) 4) (+ 3 * 4)"); */ |