From e98f89c84ec0492a36e364ac32987e17296b33df Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Fri, 6 Jan 2023 08:04:26 -0800 Subject: no obvious memory problems --- src/parser.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index ba9788a..0997f18 100644 --- a/src/parser.c +++ b/src/parser.c @@ -129,14 +129,12 @@ void parse_bind(parser_t *parser) { parser_error(parser); token_t *t = parser->tokens[parser->i]; char *name = t->value; - printf("%s\n", name); parser_move(parser); ast_t *expr = parse_expr(parser); /* unevaluated expr will be evaluated when hash table transfers to visitor JIT */ if (expr == NULL) parser_error(parser); hash_table_add(parser->symbol_table, name, expr); - printf("after add\n"); if (parser->tokens[parser->i]->type != TOKEN_RPAREN) parser_error(parser); @@ -154,7 +152,6 @@ ast_t *parse_list(parser_t *parser) { while (current_token->type != TOKEN_RPAREN) { if (current_token->type == TOKEN_ID) { if (strcmp(current_token->value, "lambda") == 0 && first_entry) { - printf("lambda here\n"); return parse_function(parser); } else if (strcmp(current_token->value, "bind") == 0 && first_entry) { parse_bind(parser); @@ -208,7 +205,6 @@ ast_t *parse_expr(parser_t *parser) { else if (t->type == TOKEN_LPAREN) return parse_list(parser); else { - printf("DEBUG\n"); printf("%d", t->type); parser_error(parser); } @@ -223,7 +219,6 @@ ast_t *parse_all(parser_t *parser) { while (t != NULL) { cur = parse_expr(parser); if (cur == NULL) { - printf("this is happening\n"); t = parser->tokens[parser->i]; continue; } -- cgit