diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 19:03:35 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 19:03:35 +0000 |
commit | 4f4f7933b1b7ff34f8633b1686b18b2d1b994c47 (patch) | |
tree | a390d74ee5272a4a0070f5d4ea5281a04d4ba56a /crates/ra_syntax/src/lib.rs | |
parent | c9e42fcf245be16958dca6571e4bccc6c29199df (diff) | |
parent | 921689b70da39160dd381e9716472827e36b03b8 (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.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> { |