aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-16 05:48:05 +0000
committerGitHub <[email protected]>2021-03-16 05:48:05 +0000
commit152f385055510c65bd94238878be23a258f5cc19 (patch)
treee8470eb83c1bc1283f0bb28ea01db789607a3140 /crates/hir_expand/src
parentc0a2b4e826e1da20d3cfa8c279fcdffa24f32a7d (diff)
parent8e07b23b84bff16c0decc6f2b80c27862eac6df1 (diff)
Merge #8044
8044: Fix macro expansion for statements w/o semicolon r=edwin0cheng a=edwin0cheng Fixes #7845 And up `ungrammer` to 1.12. cc @jonas-schievink bors r+ Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r--crates/hir_expand/src/db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs
index 9086e6c17..a3070f1f9 100644
--- a/crates/hir_expand/src/db.rs
+++ b/crates/hir_expand/src/db.rs
@@ -401,13 +401,14 @@ fn to_fragment_kind(db: &dyn AstDatabase, id: MacroCallId) -> FragmentKind {
401 401
402 match parent.kind() { 402 match parent.kind() {
403 MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items, 403 MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items,
404 MACRO_STMTS => FragmentKind::Statement,
404 ITEM_LIST => FragmentKind::Items, 405 ITEM_LIST => FragmentKind::Items,
405 LET_STMT => { 406 LET_STMT => {
406 // FIXME: Handle Pattern 407 // FIXME: Handle Pattern
407 FragmentKind::Expr 408 FragmentKind::Expr
408 } 409 }
409 EXPR_STMT => FragmentKind::Statements, 410 EXPR_STMT => FragmentKind::Statements,
410 BLOCK_EXPR => FragmentKind::Expr, 411 BLOCK_EXPR => FragmentKind::Statements,
411 ARG_LIST => FragmentKind::Expr, 412 ARG_LIST => FragmentKind::Expr,
412 TRY_EXPR => FragmentKind::Expr, 413 TRY_EXPR => FragmentKind::Expr,
413 TUPLE_EXPR => FragmentKind::Expr, 414 TUPLE_EXPR => FragmentKind::Expr,