rust/crates/syntax/test_data/parser/ok
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_empty.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0000_empty.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0001_struct_item.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0001_struct_item.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0002_struct_item_field.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0002_struct_item_field.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0004_file_shebang.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0004_file_shebang.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0005_fn_item.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0005_fn_item.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0006_inner_attributes.rast Update ungrammar 2021-06-11 18:34:30 +02:00
0006_inner_attributes.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0007_extern_crate.rast Wrap remaining self/super/crate in Name{Ref} 2021-01-15 22:18:43 +01:00
0007_extern_crate.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0008_mod_item.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0008_mod_item.rs internal: more local test for mod item 2021-09-17 21:53:24 +03:00
0009_use_item.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0009_use_item.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0010_use_path_segments.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0010_use_path_segments.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0011_outer_attribute.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0011_outer_attribute.rs internal: enforce no #[ignore] and no #[should_panic] 2021-06-15 16:54:43 +03:00
0012_visibility.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0012_visibility.rs internal: more local parsing tests for macros 2021-09-17 22:21:57 +03:00
0013_use_path_self_super.rast Handle self/super/crate in PathSegment as NameRef 2021-01-15 19:21:23 +01:00
0013_use_path_self_super.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0014_use_tree.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0014_use_tree.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0015_use_tree.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0015_use_tree.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0016_struct_flavors.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0016_struct_flavors.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0017_attr_trailing_comma.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0017_attr_trailing_comma.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0018_struct_type_params.rast Fix parser tests for 1.53 2021-06-17 18:09:44 +02:00
0018_struct_type_params.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0019_enums.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0019_enums.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0020_type_param_bounds.rast Fix parser tests for 1.53 2021-06-17 18:09:44 +02:00
0020_type_param_bounds.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0022_empty_extern_block.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0022_empty_extern_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0023_static_items.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0023_static_items.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0024_const_item.rast intenral: more local tests for statics 2021-09-18 01:02:43 +03:00
0024_const_item.rs intenral: more local tests for statics 2021-09-18 01:02:43 +03:00
0025_extern_fn_in_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0025_extern_fn_in_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0026_const_fn_in_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0026_const_fn_in_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0027_unsafe_fn_in_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0027_unsafe_fn_in_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0028_operator_binding_power.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0028_operator_binding_power.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0029_range_forms.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0029_range_forms.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0030_string_suffixes.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0030_string_suffixes.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0030_traits.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0030_traits.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0031_extern.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0031_extern.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0032_where_for.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0032_where_for.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0033_label_break.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0033_label_break.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0034_crate_path_in_call.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0034_crate_path_in_call.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0035_weird_exprs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0035_weird_exprs.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0036_fully_qualified.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0036_fully_qualified.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0037_mod.rast Fix attachment of inner doc comments 2020-11-12 12:09:12 +01:00
0037_mod.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0038_where_pred_type.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0038_where_pred_type.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0039_raw_fn_item.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0039_raw_fn_item.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0040_raw_struct_item_field.rast Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0040_raw_struct_item_field.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0041_raw_keywords.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0041_raw_keywords.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0042_ufcs_call_list.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0042_ufcs_call_list.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0043_complex_assignment.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0043_complex_assignment.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0044_let_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0044_let_attrs.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0045_block_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0045_block_attrs.rs fix: false positive about inner attrs in docs 2021-04-19 17:11:49 +03:00
0046_extern_inner_attributes.rast Update ungrammar 2021-06-11 18:34:30 +02:00
0046_extern_inner_attributes.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0047_minus_in_inner_pattern.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0047_minus_in_inner_pattern.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0048_compound_assignment.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0048_compound_assignment.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0049_async_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0049_async_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0050_async_block_as_argument.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0050_async_block_as_argument.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0051_parameter_attrs.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0051_parameter_attrs.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0052_for_range_block.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0052_for_range_block.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0053_outer_attribute_on_macro_rules.rast Update ungrammar 2021-06-11 18:34:30 +02:00
0053_outer_attribute_on_macro_rules.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0054_qual_path_in_type_arg.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0054_qual_path_in_type_arg.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0055_dot_dot_dot.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0055_dot_dot_dot.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0056_neq_in_type.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0056_neq_in_type.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0057_loop_in_call.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0057_loop_in_call.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0058_unary_expr_precedence.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0058_unary_expr_precedence.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0059_loops_in_parens.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0059_loops_in_parens.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0060_as_range.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0060_as_range.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0061_match_full_range.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0061_match_full_range.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0062_macro_2.0.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0062_macro_2.0.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0063_trait_fn_patterns.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0063_trait_fn_patterns.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0063_variadic_fun.rast Update ungrammar 2021-06-11 18:34:30 +02:00
0063_variadic_fun.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0064_impl_fn_params.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0064_impl_fn_params.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0065_comment_newline.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0065_comment_newline.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0065_plus_after_fn_trait_bound.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0065_plus_after_fn_trait_bound.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0066_default_modifier.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0066_default_modifier.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0067_where_for_pred.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0067_where_for_pred.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
0068_item_modifiers.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0068_item_modifiers.rs Parse unsafe extern block 2020-11-22 20:44:56 -08:00
0069_multi_trait_object.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0069_multi_trait_object.rs Add validation check for ambiguous trait objects 2020-10-06 23:52:00 +02:00
0070_expr_attr_placement.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0070_expr_attr_placement.rs feat: allow attributes on all expressions 2021-09-25 22:19:27 +03:00
0071_stmt_attr_placement.rast internal: more reasonable grammar for blocks 2021-09-26 19:16:09 +03:00
0071_stmt_attr_placement.rs feat: allow attributes on all expressions 2021-09-25 22:19:27 +03:00