remove types.TextDocument (#693)

* remove types.TextDocument

* resolve compile errors because of previous merge
This commit is contained in:
Techatrix
2022-10-01 02:45:45 +02:00
committed by GitHub
parent a8fa5c68a7
commit a9a1fad13e
10 changed files with 122 additions and 215 deletions

View File

@@ -29,7 +29,7 @@ pub fn labelReferences(
if (include_decl) {
// The first token is always going to be the label
try locations.append(allocator, .{
.uri = handle.uri(),
.uri = handle.uri,
.range = offsets.tokenToRange(handle.tree, first_tok, encoding),
});
}
@@ -45,7 +45,7 @@ pub fn labelReferences(
if (!std.mem.eql(u8, tree.tokenSlice(curr_tok + 2), tree.tokenSlice(first_tok))) continue;
try locations.append(allocator, .{
.uri = handle.uri(),
.uri = handle.uri,
.range = offsets.tokenToRange(handle.tree, curr_tok + 2, encoding),
});
}
@@ -72,7 +72,7 @@ const Builder = struct {
pub fn add(self: *Builder, handle: *DocumentStore.Handle, token_index: Ast.TokenIndex) !void {
try self.locations.append(self.arena.allocator(), .{
.uri = handle.uri(),
.uri = handle.uri,
.range = offsets.tokenToRange(handle.tree, token_index, self.encoding),
});
}