summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-05 21:02:26 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-05 21:02:26 -0800
commit5ecf1f46aae4994662bd8e3df189f8d60b49a304 (patch)
tree91b6a15d65c9e8d7a5e7ae87712830b1bf4f4eca /src/main.c
parent7ff373076c59af3ba166e5080b8ecead569d5a44 (diff)
bind works for real, I think this works now
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 2c192cb..f418925 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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"); */