mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Add MacroFileKind::Statements
This commit is contained in:
parent
3f1a0c3c5f
commit
4ff400833f
2 changed files with 2 additions and 0 deletions
|
@ -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)))
|
||||
|
|
|
@ -109,6 +109,7 @@ pub struct MacroFile {
|
|||
pub enum MacroFileKind {
|
||||
Items,
|
||||
Expr,
|
||||
Statements,
|
||||
}
|
||||
|
||||
/// `MacroCallId` identifies a particular macro invocation, like
|
||||
|
|
Loading…
Reference in a new issue