diff options
author | Aleksey Kladov <[email protected]> | 2019-05-28 15:34:28 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-28 15:34:28 +0100 |
commit | 0efbcdf43544af471a935c790ae99e2a9b5516c3 (patch) | |
tree | 4d9d65e4888cacf5fd7fbc359233afb8fe5395ad /crates/ra_syntax/src/parsing | |
parent | 310bfe57bd1ea3cd5e22d434ae9d709265af5463 (diff) |
remove old parsing methods
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index dc913cf2b..cf27a3393 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -178,12 +178,12 @@ mod tests { | |||
178 | let edit = AtomTextEdit::replace(range, replace_with.to_owned()); | 178 | let edit = AtomTextEdit::replace(range, replace_with.to_owned()); |
179 | let after = edit.apply(before.clone()); | 179 | let after = edit.apply(before.clone()); |
180 | 180 | ||
181 | let fully_reparsed = SourceFile::parse2(&after); | 181 | let fully_reparsed = SourceFile::parse(&after); |
182 | let incrementally_reparsed = { | 182 | let incrementally_reparsed = { |
183 | let f = SourceFile::parse(&before); | 183 | let f = SourceFile::parse(&before); |
184 | let edit = AtomTextEdit { delete: range, insert: replace_with.to_string() }; | 184 | let edit = AtomTextEdit { delete: range, insert: replace_with.to_string() }; |
185 | let (green, new_errors, range) = | 185 | let (green, new_errors, range) = |
186 | incremental_reparse(f.syntax(), &edit, f.errors()).unwrap(); | 186 | incremental_reparse(f.tree.syntax(), &edit, f.errors.to_vec()).unwrap(); |
187 | assert_eq!(range.len(), reparsed_len.into(), "reparsed fragment has wrong length"); | 187 | assert_eq!(range.len(), reparsed_len.into(), "reparsed fragment has wrong length"); |
188 | Parse { tree: SourceFile::new(green), errors: Arc::new(new_errors) } | 188 | Parse { tree: SourceFile::new(green), errors: Arc::new(new_errors) } |
189 | }; | 189 | }; |