summaryrefslogtreecommitdiff
path: root/src/syntax/source.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-15 12:00:13 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-15 12:40:27 +0100
commit40561e57fbbc68becac07acd54a34f94f591f277 (patch)
tree9e3401f987f1b19ef30162ac00395b7bbba871c6 /src/syntax/source.rs
parent15f0434d1fdd03bc84cacaf6a39ac294a0c75789 (diff)
Remove most fields from `SyntaxKind` enum
Diffstat (limited to 'src/syntax/source.rs')
-rw-r--r--src/syntax/source.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/syntax/source.rs b/src/syntax/source.rs
index 9b76af12..41805a60 100644
--- a/src/syntax/source.rs
+++ b/src/syntax/source.rs
@@ -8,10 +8,10 @@ use std::path::{Path, PathBuf};
use comemo::Prehashed;
use unscanny::Scanner;
+use super::ast::Markup;
+use super::reparse::reparse;
+use super::{is_newline, parse, Span, SyntaxNode};
use crate::diag::SourceResult;
-use crate::syntax::ast::Markup;
-use crate::syntax::{is_newline, parse, reparse};
-use crate::syntax::{Span, SyntaxNode};
use crate::util::{PathExt, StrExt};
/// A source file.
@@ -124,11 +124,8 @@ impl Source {
}
// Recalculate the line starts after the edit.
- self.lines.extend(lines_from(
- start_byte,
- start_utf16,
- &self.text[start_byte..],
- ));
+ self.lines
+ .extend(lines_from(start_byte, start_utf16, &self.text[start_byte..]));
// Incrementally reparse the replaced range.
let mut root = std::mem::take(&mut self.root).into_inner();