mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +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 {
|
let fragment_kind = match macro_file.macro_file_kind {
|
||||||
MacroFileKind::Items => FragmentKind::Items,
|
MacroFileKind::Items => FragmentKind::Items,
|
||||||
MacroFileKind::Expr => FragmentKind::Expr,
|
MacroFileKind::Expr => FragmentKind::Expr,
|
||||||
|
MacroFileKind::Statements => FragmentKind::Statements,
|
||||||
};
|
};
|
||||||
let (parse, rev_token_map) = mbe::token_tree_to_syntax_node(&tt, fragment_kind).ok()?;
|
let (parse, rev_token_map) = mbe::token_tree_to_syntax_node(&tt, fragment_kind).ok()?;
|
||||||
Some((parse, Arc::new(rev_token_map)))
|
Some((parse, Arc::new(rev_token_map)))
|
||||||
|
|
|
@ -109,6 +109,7 @@ pub struct MacroFile {
|
||||||
pub enum MacroFileKind {
|
pub enum MacroFileKind {
|
||||||
Items,
|
Items,
|
||||||
Expr,
|
Expr,
|
||||||
|
Statements,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `MacroCallId` identifies a particular macro invocation, like
|
/// `MacroCallId` identifies a particular macro invocation, like
|
||||||
|
|
Loading…
Reference in a new issue