mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +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::{
|
use ra_syntax::{
|
||||||
AstNode, SyntaxNode, TextRange,
|
AstNode, SyntaxNode, TextRange, SyntaxKind,
|
||||||
ast, SyntaxKind::*, TextUnit
|
ast, SyntaxKind::*, TextUnit
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,3 +90,23 @@ fn convert_tt(
|
||||||
let res = tt::Subtree { delimiter, token_trees };
|
let res = tt::Subtree { delimiter, token_trees };
|
||||||
Some(res)
|
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…
Add table
Add a link
Reference in a new issue