Add _token suffix to token accessors

I think this makes is more clear which things are : AstNode and which
are : AstToken
This commit is contained in:
Aleksey Kladov 2020-04-09 18:25:36 +02:00
parent a95116fbfa
commit e6d22187a6
12 changed files with 210 additions and 213 deletions

View file

@ -101,7 +101,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
let node = src_ptr.value.to_node(&src_ptr.file_syntax(&db));
let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.clone()) {
(self_param.self_kw().unwrap().syntax().text_range(), "self".to_string())
(self_param.self_kw_token().unwrap().syntax().text_range(), "self".to_string())
} else {
(src_ptr.value.range(), node.text().to_string().replace("\n", " "))
};