mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 23:57:30 +00:00
⬆️ rowan
It now stores text inline with tokens
This commit is contained in:
parent
46b4f89c92
commit
3429b32ad1
7 changed files with 12 additions and 17 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
use rowan::{GreenNodeBuilder, Language};
|
||||
|
||||
use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextSize};
|
||||
use crate::{Parse, SyntaxError, SyntaxKind, TextSize};
|
||||
|
||||
pub(crate) use rowan::{GreenNode, GreenToken, NodeOrToken};
|
||||
|
||||
|
@ -53,7 +53,7 @@ impl SyntaxTreeBuilder {
|
|||
Parse::new(green, errors)
|
||||
}
|
||||
|
||||
pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {
|
||||
pub fn token(&mut self, kind: SyntaxKind, text: &str) {
|
||||
let kind = RustLanguage::kind_to_raw(kind);
|
||||
self.inner.token(kind, text)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue