diff options
Diffstat (limited to 'crates/ra_hir_expand/src/db.rs')
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index 2e12e126f..af5b22d1c 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -178,6 +178,7 @@ fn to_fragment_kind(db: &dyn AstDatabase, macro_call_id: MacroCallId) -> Fragmen | |||
178 | 178 | ||
179 | match parent.kind() { | 179 | match parent.kind() { |
180 | MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items, | 180 | MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items, |
181 | ITEM_LIST => FragmentKind::Items, | ||
181 | LET_STMT => { | 182 | LET_STMT => { |
182 | // FIXME: Handle Pattern | 183 | // FIXME: Handle Pattern |
183 | FragmentKind::Expr | 184 | FragmentKind::Expr |
@@ -187,7 +188,28 @@ fn to_fragment_kind(db: &dyn AstDatabase, macro_call_id: MacroCallId) -> Fragmen | |||
187 | ARG_LIST => FragmentKind::Expr, | 188 | ARG_LIST => FragmentKind::Expr, |
188 | TRY_EXPR => FragmentKind::Expr, | 189 | TRY_EXPR => FragmentKind::Expr, |
189 | TUPLE_EXPR => FragmentKind::Expr, | 190 | TUPLE_EXPR => FragmentKind::Expr, |
190 | ITEM_LIST => FragmentKind::Items, | 191 | PAREN_EXPR => FragmentKind::Expr, |
192 | |||
193 | FOR_EXPR => FragmentKind::Expr, | ||
194 | PATH_EXPR => FragmentKind::Expr, | ||
195 | LAMBDA_EXPR => FragmentKind::Expr, | ||
196 | CONDITION => FragmentKind::Expr, | ||
197 | BREAK_EXPR => FragmentKind::Expr, | ||
198 | RETURN_EXPR => FragmentKind::Expr, | ||
199 | BLOCK_EXPR => FragmentKind::Expr, | ||
200 | MATCH_EXPR => FragmentKind::Expr, | ||
201 | MATCH_ARM => FragmentKind::Expr, | ||
202 | MATCH_GUARD => FragmentKind::Expr, | ||
203 | RECORD_FIELD => FragmentKind::Expr, | ||
204 | CALL_EXPR => FragmentKind::Expr, | ||
205 | INDEX_EXPR => FragmentKind::Expr, | ||
206 | METHOD_CALL_EXPR => FragmentKind::Expr, | ||
207 | AWAIT_EXPR => FragmentKind::Expr, | ||
208 | CAST_EXPR => FragmentKind::Expr, | ||
209 | REF_EXPR => FragmentKind::Expr, | ||
210 | PREFIX_EXPR => FragmentKind::Expr, | ||
211 | RANGE_EXPR => FragmentKind::Expr, | ||
212 | BIN_EXPR => FragmentKind::Expr, | ||
191 | _ => { | 213 | _ => { |
192 | // Unknown , Just guess it is `Items` | 214 | // Unknown , Just guess it is `Items` |
193 | FragmentKind::Items | 215 | FragmentKind::Items |