diff options
author | Aleksey Kladov <[email protected]> | 2019-09-12 10:38:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-09-12 10:38:07 +0100 |
commit | 3c68da792b52b9071e7e9bdac2b1cf8eb3c9e77b (patch) | |
tree | 38f7abdcd5c1ea03f8937e31504608320a46dd19 /crates/ra_batch | |
parent | d614f463dedc269bd766f74024745e4fb6ba7020 (diff) |
don't break parser error recovery in presence of macros
Parser has the invariant that `{}` are balanced.
Previous code tried (unsucesfuly) maintain the same invariant for
`$()` as well, but it was done in a rather ad-hoc manner: it's not at
all obvious that it is possible to maintain both invariants!
Diffstat (limited to 'crates/ra_batch')
-rw-r--r-- | crates/ra_batch/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index a14139b26..ffc9e16bb 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs | |||
@@ -89,6 +89,10 @@ pub fn load( | |||
89 | vfs.root2path(root) | 89 | vfs.root2path(root) |
90 | ); | 90 | ); |
91 | analysis_change.add_root(source_root_id, is_local); | 91 | analysis_change.add_root(source_root_id, is_local); |
92 | analysis_change.set_debug_root_path( | ||
93 | source_root_id, | ||
94 | source_roots[&source_root_id].path().display().to_string(), | ||
95 | ); | ||
92 | 96 | ||
93 | let mut file_map = FxHashMap::default(); | 97 | let mut file_map = FxHashMap::default(); |
94 | for (vfs_file, path, text) in files { | 98 | for (vfs_file, path, text) in files { |