summaryrefslogtreecommitdiff
path: root/src/visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/visitor.c')
-rw-r--r--src/visitor.c4
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;