aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 19:03:35 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 19:03:35 +0000
commit4f4f7933b1b7ff34f8633b1686b18b2d1b994c47 (patch)
treea390d74ee5272a4a0070f5d4ea5281a04d4ba56a /crates/ra_syntax/src/lib.rs
parentc9e42fcf245be16958dca6571e4bccc6c29199df (diff)
parent921689b70da39160dd381e9716472827e36b03b8 (diff)
Merge #469
469: kill text utils r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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> {