# fix confusion in block expression parsing · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4b9e782d37a334740a04190e3b3dd375f41ef3fe)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4b9e782d37a334740a04190e3b3dd375f41ef3fe

Requested commit: 4b9e782d37a334740a04190e3b3dd375f41ef3fe

Commit: 4b9e782d37a334740a04190e3b3dd375f41ef3fe

Tree: bc554e18c98fb4c1376dd409f4457e7361bceabc

Author: Josh Wolfe

Committer: Josh Wolfe

## Message

```
fix confusion in block expression parsing

closes #292

* if, try, while, for, comptime, defer are "greedy" with {} blocks,
  meaning if their bodies are blocks, then no suffix operator is allowed
  after the block. The {} block gets "built into" the containing statement,
  like the body of a switch statement.
* the Expression syntactic element is no longer "greedy" with {} blocks,
  meaning it's possible to have suffix operators after {} blocks without
  needing the {} block to be an rhs operand first.

```

## Parents

- [9968879261a8628600bfde4e438e8f8c0d2fa811](https://git.cafe/gitcafe/zig/commit/9968879261a8628600bfde4e438e8f8c0d2fa811?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4b9e782d37a334740a04190e3b3dd375f41ef3fe?format=markdown)
