From b2c539fadfa7ea3eea2e5f7c0c37b5f5f1370c5a Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 09:45:40 -0800 Subject: actually evaluates and prints something now! --- src/parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index da2cf1d..be08ac6 100644 --- a/src/parser.c +++ b/src/parser.c @@ -52,9 +52,9 @@ void parser_eat(parser_t *parser, int type) { ast_t *parse_bool(parser_t *parser) { token_t *t = parser->tokens[parser->i]; parser_move(parser); - if (strcmp("T", t->value) == 0) { + if (strcmp("T", t->value) == 0) return init_ast_bool(true); - } else + else return init_ast_bool(false); } @@ -181,4 +181,5 @@ ast_t *parse_expr(parser_t *parser) { return NULL; } +ast_t *parse_all(parser_t *parser) {} void parser_error(parser_t *parser) { exit(1); } -- cgit