Merge branch 'parser' into dev

This commit is contained in:
Matteo Flebus 2026-01-30 20:08:54 +01:00
commit 3fb5d71d66
2 changed files with 78 additions and 98 deletions

View file

@ -386,7 +386,15 @@ struct ast *parse_shell_command(struct lexer_context *ctx)
{
return parse_if_rule(ctx);
}
// TODO loops and case
else if (is_first(*token, RULE_WHILE))
{
return parse_while(ctx);
}
else if (is_first(*token, RULE_UNTIL))
{
return parse_until(ctx);
}
// TODO for and case
else
{
perror("Syntax error: unexpected token in parse_shell_command");