Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar.rs')
| -rw-r--r-- | crates/parser/src/grammar.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index d3aa56c7eb..fe6b904bd8 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs @@ -204,9 +204,8 @@ impl BlockLike { self == BlockLike::Block } - fn is_blocklike(expr: &CompletedMarker, p: &Parser<'_>) -> bool { - matches!(expr.kind(), BLOCK_EXPR | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR) - || (expr.last_token(p) == Some(T!['}']) && !matches!(expr.kind(), CLOSURE_EXPR)) + fn is_blocklike(kind: SyntaxKind) -> bool { + matches!(kind, BLOCK_EXPR | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR) } } |