rust/crates/syntax/test_data/parser/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
..
0000_struct_field_missing_comma.rast
0000_struct_field_missing_comma.rs
0001_item_recovery_in_file.rast
0001_item_recovery_in_file.rs
0002_duplicate_shebang.rast
0002_duplicate_shebang.rs
0003_C++_semicolon.rast
0003_C++_semicolon.rs
0004_use_path_bad_segment.rast
0004_use_path_bad_segment.rs
0005_attribute_recover.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0005_attribute_recover.rs
0006_named_field_recovery.rast
0006_named_field_recovery.rs
0007_stray_curly_in_file.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0007_stray_curly_in_file.rs
0008_item_block_recovery.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0008_item_block_recovery.rs
0009_broken_struct_type_parameter.rast feat: allow attributes on all expressions 2021-09-25 22:19:27 +03:00
0009_broken_struct_type_parameter.rs
0010_unsafe_lambda_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0010_unsafe_lambda_block.rs
0011_extern_struct.rast
0011_extern_struct.rs
0012_broken_lambda.rast
0013_invalid_type.rast
0013_invalid_type.rs
0014_where_no_bounds.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0014_where_no_bounds.rs
0015_curly_in_params.rast
0015_curly_in_params.rs
0016_missing_semi.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0016_missing_semi.rs
0017_incomplete_binexpr.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0017_incomplete_binexpr.rs
0018_incomplete_fn.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0018_incomplete_fn.rs
0019_let_recover.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0019_let_recover.rs
0020_fn_recover.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0020_fn_recover.rs
0021_incomplete_param.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0021_incomplete_param.rs
0022_bad_exprs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0022_bad_exprs.rs
0023_mismatched_paren.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0023_mismatched_paren.rs
0024_many_type_parens.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0024_many_type_parens.rs
0025_nope.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0025_nope.rs
0026_imp_recovery.rast
0026_imp_recovery.rs
0027_incomplere_where_for.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0027_incomplere_where_for.rs
0029_field_completion.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0029_field_completion.rs
0031_block_inner_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0031_block_inner_attrs.rs
0032_match_arms_inner_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0032_match_arms_inner_attrs.rs
0033_match_arms_outer_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0033_match_arms_outer_attrs.rs
0034_bad_box_pattern.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0034_bad_box_pattern.rs
0035_use_recover.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0035_use_recover.rs
0036_partial_use.rast
0036_partial_use.rs
0037_visibility_in_traits.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0037_visibility_in_traits.rs
0038_endless_inclusive_range.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0038_endless_inclusive_range.rs
0039_lambda_recovery.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0039_lambda_recovery.rs
0040_illegal_crate_kw_location.rast
0040_illegal_crate_kw_location.rs
0041_illegal_super_keyword_location.rast
0041_illegal_super_keyword_location.rs
0042_illegal_self_keyword_location.rast
0042_illegal_self_keyword_location.rs
0043_weird_blocks.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0043_weird_blocks.rs
0044_unexpected_for_type.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0044_unexpected_for_type.rs
0045_item_modifiers.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0045_item_modifiers.rs
0046_ambiguous_trait_object.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0046_ambiguous_trait_object.rs
0047_mutable_const_item.rast
0047_mutable_const_item.rs
0048_repated_extern_modifier.rast fix: avoid panic when parsing extern block 2021-08-30 15:40:47 +03:00
0048_repated_extern_modifier.rs fix: avoid panic when parsing extern block 2021-08-30 15:40:47 +03:00
0049_double_fish.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0049_double_fish.rs internal: add erroneous test for double turbo fish 2021-09-19 11:42:10 +03:00