token source scaffold

This commit is contained in:
Aleksey Kladov 2019-02-23 14:18:32 +03:00
parent e9cafafbc2
commit 10deefd371

View file

@ -1,5 +1,6 @@
use ra_parser::TokenSource;
use ra_syntax::{
AstNode, SyntaxNode, TextRange,
AstNode, SyntaxNode, TextRange, SyntaxKind,
ast, SyntaxKind::*, TextUnit
};
@ -89,3 +90,23 @@ fn convert_tt(
let res = tt::Subtree { delimiter, token_trees };
Some(res)
}
struct TtTokenSource;
impl TtTokenSource {
fn new(tt: &tt::Subtree) -> TtTokenSource {
unimplemented!()
}
}
impl TokenSource for TtTokenSource {
fn token_kind(&self, pos: usize) -> SyntaxKind {
unimplemented!()
}
fn is_token_joint_to_next(&self, pos: usize) -> bool {
unimplemented!()
}
fn is_keyword(&self, pos: usize, kw: &str) -> bool {
unimplemented!()
}
}