diff options
author | Aleksey Kladov <[email protected]> | 2019-02-23 11:06:10 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-23 13:55:18 +0000 |
commit | 60373aa5047b350cd12fb1fa3c03f49b77d2448d (patch) | |
tree | e75595d6886e1056d8db0973624f770dc3e74892 /crates | |
parent | f078f7adc8ac0ffae07462d736083807c98c0483 (diff) |
add interface
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
19 | Some((tt, token_map)) | 19 | Some((tt, token_map)) |
20 | } | 20 | } |
21 | 21 | ||
22 | /// Parses the token tree (result of macro expansion) as a sequence of items | ||
23 | pub fn token_tree_to_ast_item_list(tt: &tt::Subtree) -> ast::SourceFile { | ||
24 | unimplemented!() | ||
25 | } | ||
26 | |||
22 | impl TokenMap { | 27 | impl TokenMap { |
23 | pub fn relative_range_of(&self, tt: tt::TokenId) -> Option<TextRange> { | 28 | pub fn relative_range_of(&self, tt: tt::TokenId) -> Option<TextRange> { |
24 | let idx = tt.0 as usize; | 29 | let idx = tt.0 as usize; |