aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/lib.rs')
-rw-r--r--crates/ra_syntax/src/lib.rs4
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;
31mod reparsing; 31mod reparsing;
32mod string_lexing; 32mod string_lexing;
33mod syntax_kinds; 33mod syntax_kinds;
34pub mod text_utils;
35/// Utilities for simple uses of the parser. 34/// Utilities for simple uses of the parser.
36pub mod utils; 35pub mod utils;
37mod validation; 36mod 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> {