fix(parser): made it compile

This commit is contained in:
Matteo Flebus 2026-01-16 20:27:57 +01:00
parent ed42f0b93d
commit ce60a95471
2 changed files with 10 additions and 6 deletions

View file

@ -18,12 +18,12 @@
struct ast *get_ast()
{
struct token *token = PEEK_TOKEN();
struct ast *res;
if (token->type == TOKEN_EOF)
{
token = pop_token();
// TODO
// return ast END.
return ast_create_end();
}
else if (token->type == TOKEN_NEWLINE)
{
@ -32,7 +32,7 @@ struct ast *get_ast()
}
else // TOKEN WORD
{
current_node = parse_list();
res = parse_list();
}
/*
@ -44,8 +44,7 @@ struct ast *get_ast()
}
*/
struct ast *result = ast_create_list(result_list);
return result;
return res;
}
// TODO