mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
token source scaffold
This commit is contained in:
parent
e9cafafbc2
commit
10deefd371
1 changed files with 22 additions and 1 deletions
|
@ -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!()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue