From 4ff400833f860fb5db8adb1b999343b1fb4e3ccb Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 22 Nov 2019 02:34:06 +0800 Subject: Add MacroFileKind::Statements --- crates/ra_hir_expand/src/db.rs | 1 + crates/ra_hir_expand/src/lib.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'crates/ra_hir_expand/src') 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( let fragment_kind = match macro_file.macro_file_kind { MacroFileKind::Items => FragmentKind::Items, MacroFileKind::Expr => FragmentKind::Expr, + MacroFileKind::Statements => FragmentKind::Statements, }; let (parse, rev_token_map) = mbe::token_tree_to_syntax_node(&tt, fragment_kind).ok()?; 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 { pub enum MacroFileKind { Items, Expr, + Statements, } /// `MacroCallId` identifies a particular macro invocation, like -- cgit v1.2.3