Bad error message when comptime condition expecting statement contains garbage
fn main() {
$if X==1 {
1
}
}
┌─ testinput:6:9
│
5 │ $if X == 0 {
│ - to close this
6 │ 1
│ ^ Expected `}`
The error is caused by the fact that the parser for the comptime block doesn't know how to report an error if unexpected tokens are left inside it. In this case, a more reasonable error might be expected statement or {
, but implementing that isn't straight forward (at least not for me in my current tired state)