rust/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
0001_array_type_missing_semi.rs
0002_misplaced_label_err.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0002_misplaced_label_err.rs
0003_pointer_type_no_mutability.rast
0003_pointer_type_no_mutability.rs
0004_impl_type.rast
0004_impl_type.rs
0005_fn_pointer_type_missing_fn.rast
0005_fn_pointer_type_missing_fn.rs
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
0007_async_without_semicolon.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0007_async_without_semicolon.rs
0008_pub_expr.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0008_pub_expr.rs
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
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
0014_struct_field_recover.rast
0014_struct_field_recover.rs
0015_empty_segment.rast
0015_empty_segment.rs
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