diff options
Diffstat (limited to 'crates/ra_syntax/src/lib.rs')
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index a75e641ea..1dbfca91b 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -31,7 +31,6 @@ mod parser_impl; | |||
31 | mod reparsing; | 31 | mod reparsing; |
32 | mod string_lexing; | 32 | mod string_lexing; |
33 | mod syntax_kinds; | 33 | mod syntax_kinds; |
34 | pub mod text_utils; | ||
35 | /// Utilities for simple uses of the parser. | 34 | /// Utilities for simple uses of the parser. |
36 | pub mod utils; | 35 | pub mod utils; |
37 | mod validation; | 36 | mod validation; |
@@ -75,8 +74,7 @@ impl SourceFile { | |||
75 | .map(|(green_node, errors)| SourceFile::new(green_node, errors)) | 74 | .map(|(green_node, errors)| SourceFile::new(green_node, errors)) |
76 | } | 75 | } |
77 | fn full_reparse(&self, edit: &AtomTextEdit) -> TreePtr<SourceFile> { | 76 | fn full_reparse(&self, edit: &AtomTextEdit) -> TreePtr<SourceFile> { |
78 | let text = | 77 | let text = edit.apply(self.syntax().text().to_string()); |
79 | text_utils::replace_range(self.syntax().text().to_string(), edit.delete, &edit.insert); | ||
80 | SourceFile::parse(&text) | 78 | SourceFile::parse(&text) |
81 | } | 79 | } |
82 | pub fn errors(&self) -> Vec<SyntaxError> { | 80 | pub fn errors(&self) -> Vec<SyntaxError> { |