diff options
author | Aleksey Kladov <[email protected]> | 2019-02-23 11:18:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-23 13:55:18 +0000 |
commit | 10deefd3718b5665b4955908e057a48b7ad61464 (patch) | |
tree | 7a0a89bb427eabb3dd56c0bf3f5f2c7a30eeaaf3 /crates | |
parent | e9cafafbc2108dd91ca687bc8c21bc6a7fe2dfff (diff) |
token source scaffold
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 2c8ab302f..e64ba7ff2 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -1,5 +1,6 @@ | |||
1 | use ra_parser::TokenSource; | ||
1 | use ra_syntax::{ | 2 | use ra_syntax::{ |
2 | AstNode, SyntaxNode, TextRange, | 3 | AstNode, SyntaxNode, TextRange, SyntaxKind, |
3 | ast, SyntaxKind::*, TextUnit | 4 | ast, SyntaxKind::*, TextUnit |
4 | }; | 5 | }; |
5 | 6 | ||
@@ -89,3 +90,23 @@ fn convert_tt( | |||
89 | let res = tt::Subtree { delimiter, token_trees }; | 90 | let res = tt::Subtree { delimiter, token_trees }; |
90 | Some(res) | 91 | Some(res) |
91 | } | 92 | } |
93 | |||
94 | struct TtTokenSource; | ||
95 | |||
96 | impl TtTokenSource { | ||
97 | fn new(tt: &tt::Subtree) -> TtTokenSource { | ||
98 | unimplemented!() | ||
99 | } | ||
100 | } | ||
101 | |||
102 | impl TokenSource for TtTokenSource { | ||
103 | fn token_kind(&self, pos: usize) -> SyntaxKind { | ||
104 | unimplemented!() | ||
105 | } | ||
106 | fn is_token_joint_to_next(&self, pos: usize) -> bool { | ||
107 | unimplemented!() | ||
108 | } | ||
109 | fn is_keyword(&self, pos: usize, kw: &str) -> bool { | ||
110 | unimplemented!() | ||
111 | } | ||
112 | } | ||