rust-analyzer/crates/syntax/test_data/parser/inline/err
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
..
0001_array_type_missing_semi.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0001_array_type_missing_semi.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0002_misplaced_label_err.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0002_misplaced_label_err.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0003_pointer_type_no_mutability.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0003_pointer_type_no_mutability.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0004_impl_type.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0004_impl_type.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0005_fn_pointer_type_missing_fn.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0005_fn_pointer_type_missing_fn.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0006_unsafe_block_in_mod.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0006_unsafe_block_in_mod.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0007_async_without_semicolon.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0007_async_without_semicolon.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0008_pub_expr.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0008_pub_expr.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0010_bad_tuple_index_expr.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0010_bad_tuple_index_expr.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0013_anonymous_static.rast intenral: more local tests for statics 2021-09-18 01:02:43 +03:00
0013_anonymous_static.rs intenral: more local tests for statics 2021-09-18 01:02:43 +03:00
0014_record_literal_before_ellipsis_recovery.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0014_record_literal_before_ellipsis_recovery.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0014_struct_field_recover.rast Complete pub in fields 2020-08-25 17:22:23 +02:00
0014_struct_field_recover.rs Complete pub in fields 2020-08-25 17:22:23 +02:00
0015_empty_segment.rast Handle self/super/crate in PathSegment as NameRef 2021-01-15 19:21:23 +01:00
0015_empty_segment.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0015_missing_fn_param_type.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0015_missing_fn_param_type.rs feat: improve parser error recovery for function parameters 2021-07-17 22:41:04 +03:00