Add MacroFileKind::Statements

This commit is contained in:
Edwin Cheng 2019-11-22 02:34:06 +08:00
parent 3f1a0c3c5f
commit 4ff400833f
2 changed files with 2 additions and 0 deletions

View file

@ -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)))

View file

@ -109,6 +109,7 @@ pub struct MacroFile {
pub enum MacroFileKind {
Items,
Expr,
Statements,
}
/// `MacroCallId` identifies a particular macro invocation, like