diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-06 11:14:52 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-06 11:14:52 -0800 |
commit | 30f12dfc1f32688f377913c52b131aa78d7830b5 (patch) | |
tree | b59a2822cb6edb062b9965e6dc89b718d65b596b /src/visitor.c | |
parent | e98f89c84ec0492a36e364ac32987e17296b33df (diff) |
fixed stack bug; found recursion bug
Diffstat (limited to 'src/visitor.c')
-rw-r--r-- | src/visitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/visitor.c b/src/visitor.c index 736ce03..5e58952 100644 --- a/src/visitor.c +++ b/src/visitor.c @@ -44,7 +44,7 @@ bool is_built_in(ast_t *e) { /* Comparison functions */ if (strcmp(cmp, "<") == 0 || strcmp(cmp, ">") == 0 || strcmp(cmp, "=") == 0 || strcmp(cmp, "<=") == 0 || strcmp(cmp, ">=") == 0 || - strcmp(cmp, "eq") == 0) + strcmp(cmp, "eq") == 0 || strcmp(cmp, "if") == 0) return true; /* Type-checking */ @@ -67,6 +67,8 @@ bool is_built_in(ast_t *e) { * =, equal (for strings), input */ ast_t *eval_symbol(visitor_t *v, ast_t *e) { /* hash_table_t *lmao = stack_peek(v->stack_frame); */ + printf("symbol\n"); + printf("%s\n", e->string_value); hash_table_t *h = stack_peek(v->stack_frame); if (is_built_in(e)) return e; |