mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
add is_blocklike func on BlockLike
This commit is contained in:
parent
98990affe5
commit
6e97527eae
3 changed files with 14 additions and 17 deletions
|
@ -163,10 +163,8 @@ pub(super) fn atom_expr(
|
|||
return None;
|
||||
}
|
||||
};
|
||||
let blocklike = match done.kind() {
|
||||
IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR | BLOCK_EXPR => BlockLike::Block,
|
||||
_ => BlockLike::NotBlock,
|
||||
};
|
||||
let blocklike =
|
||||
if BlockLike::is_blocklike(done.kind()) { BlockLike::Block } else { BlockLike::NotBlock };
|
||||
Some((done, blocklike))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue