Better import handling

This commit is contained in:
Alexandros Naskos
2021-03-30 15:41:59 +03:00
parent afc6d1fd1f
commit f382a1b22d
4 changed files with 47 additions and 31 deletions

View File

@@ -538,7 +538,7 @@ pub fn symbolReferences(
switch (decl_handle.decl.*) {
.ast_node => |decl_node| {
try symbolReferencesInternal(arena, store, .{ .node = 0, .handle = curr_handle }, decl_handle, encoding, context, handler);
var imports = std.ArrayList(*DocumentStore.Handle).init(&arena.allocator);
var handle_it = store.handles.iterator();
@@ -553,7 +553,7 @@ pub fn symbolReferences(
var i: usize = 0;
blk: while (i < imports.items.len) : (i += 1) {
const import = imports.items[i];
for (import.import_uris.items) |uri| {
for (import.imports_used.items) |uri| {
const h = store.getHandle(uri) orelse break;
if (h == curr_handle) {