mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-04 17:40:50 +00:00
Convert code to text-size
This commit is contained in:
parent
27a7718880
commit
b1d5817dd1
75 changed files with 438 additions and 456 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
use rowan::{GreenNodeBuilder, Language};
|
||||
|
||||
use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextUnit};
|
||||
use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextSize};
|
||||
|
||||
pub(crate) use rowan::{GreenNode, GreenToken};
|
||||
|
||||
|
@ -69,7 +69,7 @@ impl SyntaxTreeBuilder {
|
|||
self.inner.finish_node()
|
||||
}
|
||||
|
||||
pub fn error(&mut self, error: ra_parser::ParseError, text_pos: TextUnit) {
|
||||
pub fn error(&mut self, error: ra_parser::ParseError, text_pos: TextSize) {
|
||||
self.errors.push(SyntaxError::new_at_offset(error.0, text_pos))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue