Fix parsing of block expressions in "forbid_structs" contexts.

Forbidding block expressions entirely is too strict; instead, we should only
forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a
range expression).
This commit is contained in:
Geoffry Song 2019-10-02 23:38:03 -07:00
parent e1c3675951
commit 9638adaa40
11 changed files with 242 additions and 54 deletions

View file

@ -1,5 +1,5 @@
// Stores definitions which must be used in multiple places
// See `cargo gen-syntax` (defined in crates/tools/src/main.rs)
// See `cargo gen-syntax` (defined in crates/ra_tools/src/main.rs)
Grammar(
punct: [
(";", "SEMI"),