From 6fe77e2f20f045b89ed10c3952f8f088e9bd3d6c Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Wed, 4 Jan 2023 18:22:24 -0800 Subject: fully functional parser (collisions might be a problem) --- src/visitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/visitor.c') diff --git a/src/visitor.c b/src/visitor.c index a6fc040..96eb191 100644 --- a/src/visitor.c +++ b/src/visitor.c @@ -68,11 +68,10 @@ ast_t *eval_symbol(visitor_t *v, ast_t *e) { if (is_built_in(e)) return e; - else if (hash_table_exists(stack_peek(v->stack_frame), e->string_value)) - return hash_table_get(stack_peek(v->stack_frame), e->string_value); - else if (hash_table_exists(v->eval_table, e->string_value)) return hash_table_get(v->eval_table, e->string_value); + else if (hash_table_exists(stack_peek(v->stack_frame), e->string_value)) + return hash_table_get(stack_peek(v->stack_frame), e->string_value); else if (hash_table_exists(v->symbol_table, e->string_value)) { ast_t *unevaled = hash_table_get(v->symbol_table, e->string_value); -- cgit