diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-03 09:45:40 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-03 09:45:40 -0800 |
commit | b2c539fadfa7ea3eea2e5f7c0c37b5f5f1370c5a (patch) | |
tree | 0f4b9db8c6bf345c9011667c9fbb61393d93a347 /src/parser.c | |
parent | 9f342255a2260480701cc2ac2d0c623d4aba1348 (diff) |
actually evaluates and prints something now!
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |