cleanup expansion to item list

This commit is contained in:
Aleksey Kladov 2019-09-10 22:12:37 +03:00
parent b9d9db83d1
commit 9eb14e1170
5 changed files with 11 additions and 34 deletions

View file

@ -90,7 +90,7 @@ impl HirFileId {
})
.ok()?;
match macro_file.macro_file_kind {
MacroFileKind::Items => Some(Parse::to_syntax(mbe::token_tree_to_ast_item_list(&tt))),
MacroFileKind::Items => mbe::token_tree_to_items(&tt).ok().map(Parse::to_syntax),
MacroFileKind::Expr => mbe::token_tree_to_expr(&tt).ok().map(Parse::to_syntax),
}
}