From 60373aa5047b350cd12fb1fa3c03f49b77d2448d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Feb 2019 14:06:10 +0300 Subject: add interface --- crates/ra_mbe/src/syntax_bridge.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 848c785f8..2c8ab302f 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs @@ -19,6 +19,11 @@ pub fn ast_to_token_tree(ast: &ast::TokenTree) -> Option<(tt::Subtree, TokenMap) Some((tt, token_map)) } +/// Parses the token tree (result of macro expansion) as a sequence of items +pub fn token_tree_to_ast_item_list(tt: &tt::Subtree) -> ast::SourceFile { + unimplemented!() +} + impl TokenMap { pub fn relative_range_of(&self, tt: tt::TokenId) -> Option { let idx = tt.0 as usize; -- cgit v1.2.3