Explained here
Actually, this broke with the grammar changes in #1685. Basically, we have this rule at stmt level:
Statement
<- ...
/ LabeledStatement
...
/ AssignExpr SEMICOLON
LabeledStatement <- BlockLabel? (Block / LoopStatement)
AssignExpr expands into all other expressions. LabeledStatement is before AssignExpr so that rule is being parsed first, succeeds and then Statement succeeds. Then the parser tries to end the __case_1 block, which then fails the parsing.
The parser parses the grammar correctly, but the new grammar just does not allow this syntax. I can't come up with a solution on top of my head right now.
Edit: Well, a solution would be to make translate-c conform to this new grammar. Idk if we want to put in the work to make x:{}.* = 1; valid at stmt level.
Explained [here](https://github.com/ziglang/zig/issues/2043#issuecomment-472900431)
> Actually, this broke with the grammar changes in #1685. Basically, we have this rule at stmt level:
>
> ```
> Statement
> <- ...
> / LabeledStatement
> ...
> / AssignExpr SEMICOLON
>
> LabeledStatement <- BlockLabel? (Block / LoopStatement)
> ```
> `AssignExpr` expands into all other expressions. `LabeledStatement` is before `AssignExpr` so that rule is being parsed first, succeeds and then `Statement` succeeds. Then the parser tries to end the `__case_1` block, which then fails the parsing.
>
> The parser parses the grammar correctly, but the new grammar just does not allow this syntax. I can't come up with a solution on top of my head right now.
>
> Edit: Well, a solution would be to make translate-c conform to this new grammar. Idk if we want to put in the work to make `x:{}.* = 1;` valid at stmt level.