diff options
author | Edwin Cheng <[email protected]> | 2019-11-21 18:34:06 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2019-11-21 18:38:14 +0000 |
commit | 4ff400833f860fb5db8adb1b999343b1fb4e3ccb (patch) | |
tree | fe271094485744861150d25dd0d460ccb165011b /crates | |
parent | 3f1a0c3c5f4e52505ca83cb217201b116453c896 (diff) |
Add MacroFileKind::Statements
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 1 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index 3c11c8a22..e1d93a8ef 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -151,6 +151,7 @@ pub(crate) fn parse_macro( | |||
151 | let fragment_kind = match macro_file.macro_file_kind { | 151 | let fragment_kind = match macro_file.macro_file_kind { |
152 | MacroFileKind::Items => FragmentKind::Items, | 152 | MacroFileKind::Items => FragmentKind::Items, |
153 | MacroFileKind::Expr => FragmentKind::Expr, | 153 | MacroFileKind::Expr => FragmentKind::Expr, |
154 | MacroFileKind::Statements => FragmentKind::Statements, | ||
154 | }; | 155 | }; |
155 | let (parse, rev_token_map) = mbe::token_tree_to_syntax_node(&tt, fragment_kind).ok()?; | 156 | let (parse, rev_token_map) = mbe::token_tree_to_syntax_node(&tt, fragment_kind).ok()?; |
156 | Some((parse, Arc::new(rev_token_map))) | 157 | Some((parse, Arc::new(rev_token_map))) |
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 1389f64ce..126d12fbb 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs | |||
@@ -109,6 +109,7 @@ pub struct MacroFile { | |||
109 | pub enum MacroFileKind { | 109 | pub enum MacroFileKind { |
110 | Items, | 110 | Items, |
111 | Expr, | 111 | Expr, |
112 | Statements, | ||
112 | } | 113 | } |
113 | 114 | ||
114 | /// `MacroCallId` identifies a particular macro invocation, like | 115 | /// `MacroCallId` identifies a particular macro invocation, like |