diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-05 21:02:26 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-05 21:02:26 -0800 |
commit | 5ecf1f46aae4994662bd8e3df189f8d60b49a304 (patch) | |
tree | 91b6a15d65c9e8d7a5e7ae87712830b1bf4f4eca /src/main.c | |
parent | 7ff373076c59af3ba166e5080b8ecead569d5a44 (diff) |
bind works for real, I think this works now
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -78,13 +78,14 @@ int main(int argc, char **argv) { /* print(res); */ /* DONE: TEST NON-BUILTIN FUNCTIONS (stack frame) */ - lexer_t *lexer = init_lexer("((lambda (x y) (+ x y)) (+ 3 4) 4)"); + lexer_t *lexer = init_lexer( + "(bind hello 3) ((lambda (x y) (+ x y)) (+ hello 4) 4) (+ 3 4)"); parser_t *parser = init_parser(lexer); visitor_t *visitor = init_visitor(parser); - ast_t *root = eval(visitor); - ast_t *res = root->subnodes[0]; - print(res); + print_root(root); + /* ast_t *res = root->subnodes[0]; */ + /* print(res); */ /* TODO: TEST REPL POSSIBILITY */ /* printf("Welcome to the NXS REPL.\n"); */ |