rust/crates
Aleksey Kladov 2bf81922f7 internal: more reasonable grammar for blocks
Consider these expples

        { 92 }
  async { 92 }
    'a: { 92 }
   #[a] { 92 }

Previously the tree for them were

  BLOCK_EXPR
    { ... }

  EFFECT_EXPR
    async
    BLOCK_EXPR
      { ... }

  EFFECT_EXPR
    'a:
    BLOCK_EXPR
      { ... }

  BLOCK_EXPR
    #[a]
    { ... }

As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers

  BLOCK_EXPR
    STMT_LIST
      { ... }

  BLOCK_EXPR
    async
    STMT_LIST
      { ... }

  BLOCK_EXPR
    'a:
    STMT_LIST
      { ... }

  BLOCK_EXPR
    #[a]
    STMT_LIST
      { ... }
2021-09-26 19:16:09 +03:00
..
base_db feat: Implement inline callers assist 2021-09-25 18:39:43 +02:00
cfg
flycheck
hir internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
hir_def internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
hir_expand internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
hir_ty internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
ide internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
ide_assists internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
ide_completion internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
ide_db internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
ide_diagnostics Fix item-level lazy macro errors 2021-09-24 21:17:25 +02:00
ide_ssr Simplify 2021-09-19 23:34:07 +02:00
limit
mbe internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
parser internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
paths
proc_macro_api Simplify 2021-09-19 23:34:07 +02:00
proc_macro_srv
proc_macro_test
profile
project_model Simplify 2021-09-19 19:00:06 +02:00
rust-analyzer Give rustfmt spawn error context. 2021-09-24 17:51:47 +01:00
sourcegen
stdx
syntax internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
test_utils Simplify 2021-09-19 19:00:06 +02:00
text_edit
toolchain
tt
vfs
vfs-notify