mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Fix parsing of blocks without {
This commit is contained in:
parent
fb8fb65131
commit
359d3be308
11 changed files with 107 additions and 62 deletions
|
@ -54,7 +54,7 @@ pub(crate) mod fragments {
|
|||
use super::*;
|
||||
|
||||
pub(crate) use super::{
|
||||
expressions::block, paths::type_path as path, patterns::pattern, types::type_,
|
||||
expressions::block_expr, paths::type_path as path, patterns::pattern, types::type_,
|
||||
};
|
||||
|
||||
pub(crate) fn expr(p: &mut Parser) {
|
||||
|
@ -143,7 +143,7 @@ pub(crate) fn reparser(
|
|||
parent: Option<SyntaxKind>,
|
||||
) -> Option<fn(&mut Parser)> {
|
||||
let res = match node {
|
||||
BLOCK_EXPR => expressions::block,
|
||||
BLOCK_EXPR => expressions::block_expr,
|
||||
RECORD_FIELD_DEF_LIST => items::record_field_def_list,
|
||||
RECORD_FIELD_LIST => items::record_field_list,
|
||||
ENUM_VARIANT_LIST => items::enum_variant_list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue