Given the code ((])), the lexer/parser should only complain about one unbalanced bracket, namely the ].
In reality though, it also complains about the right-most closing round bracket since the bracket stack is not implemented properly.
Current output:
error[E010]: found `(`, but expected declaration
--> ${DIRECTORY}/x.lushui:1:1
|
1 | ((]))
| ^ unexpected token
|
error[E001]: unbalanced square bracket
--> ${DIRECTORY}/x.lushui:1:3
|
1 | ((]))
| ^ has no matching opening square bracket
|
error[E001]: unbalanced round bracket
--> ${DIRECTORY}/x.lushui:1:5
|
1 | ((]))
| ^ has no matching opening round bracket
|
Given the code
((]))
, the lexer/parser should only complain about one unbalanced bracket, namely the]
. In reality though, it also complains about the right-most closing round bracket since the bracket stack is not implemented properly.Current output: