fix(parsing/cmdgroup): report error the same way as everywhere else, prevent double report

before:
```
$ ()
minishell: syntax error near unexpected token `)'
minishell: syntax error near unexpected token `)'
```
after:
```
$ ()
minishell: syntax error near unexpected token `)'
```
This probably fixes a few bugs as well, but I didn't look too hard. It just
seemed nicer to have a consistent way to report errors.
This commit is contained in:
Khaïs COLIN 2025-04-16 15:43:10 +02:00
parent ced979dd31
commit 96e46e9130
4 changed files with 23 additions and 20 deletions

View file

@ -635,4 +635,13 @@ minishell: syntax error near unexpected token `|'
2
EOF
when_run <<EOF "unclosed cmdgroup"
(echo hi
echo \$?
EOF
expecting <<"EOF"
minishell: syntax error near unexpected token `newline'
2
EOF
finalize