mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-30 15:03:42 +00:00
2bf81922f7
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 { ... } |
||
---|---|---|
.. | ||
0001_array_type_missing_semi.rast | ||
0001_array_type_missing_semi.rs | ||
0002_misplaced_label_err.rast | ||
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 | ||
0006_unsafe_block_in_mod.rs | ||
0007_async_without_semicolon.rast | ||
0007_async_without_semicolon.rs | ||
0008_pub_expr.rast | ||
0008_pub_expr.rs | ||
0010_bad_tuple_index_expr.rast | ||
0010_bad_tuple_index_expr.rs | ||
0013_anonymous_static.rast | ||
0013_anonymous_static.rs | ||
0014_record_literal_before_ellipsis_recovery.rast | ||
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 | ||
0015_missing_fn_param_type.rs |