mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
switch to upstream rowan's API
This commit is contained in:
parent
7bde8012cb
commit
c9cfd57eea
22 changed files with 208 additions and 738 deletions
|
@ -24,10 +24,7 @@ impl ast::NameRef {
|
|||
}
|
||||
|
||||
fn text_of_first_token(node: &SyntaxNode) -> &SmolStr {
|
||||
match node.0.green().children().first() {
|
||||
Some(rowan::GreenElement::Token(it)) => it.text(),
|
||||
_ => panic!(),
|
||||
}
|
||||
node.green().children().first().and_then(|it| it.as_token()).unwrap().text()
|
||||
}
|
||||
|
||||
impl ast::Attr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue