aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-23 11:18:32 +0000
committerAleksey Kladov <[email protected]>2019-02-23 13:55:18 +0000
commit10deefd3718b5665b4955908e057a48b7ad61464 (patch)
tree7a0a89bb427eabb3dd56c0bf3f5f2c7a30eeaaf3 /crates
parente9cafafbc2108dd91ca687bc8c21bc6a7fe2dfff (diff)
token source scaffold
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs23
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 @@
1use ra_parser::TokenSource;
1use ra_syntax::{ 2use 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
94struct TtTokenSource;
95
96impl TtTokenSource {
97 fn new(tt: &tt::Subtree) -> TtTokenSource {
98 unimplemented!()
99 }
100}
101
102impl 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}