update for anytype field yeeting

Updates ZLS to account for the yeeting of anytype fields: https://github.com/ziglang/zig/pull/10766

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-02-02 22:00:31 -07:00
parent 18a23c1aa2
commit 515cdd95a0
3 changed files with 2 additions and 7 deletions

View File

@ -1691,7 +1691,6 @@ fn addOutlineNodes(allocator: std.mem.Allocator, tree: Ast, child: Ast.Node.Inde
.@"if",
.if_simple,
.multiline_string_literal,
.@"anytype",
.block,
.block_semicolon,
.block_two,
@ -2295,8 +2294,9 @@ const CompletionContext = struct {
return @truncate(u32, std.hash.Wyhash.hash(0, item.label));
}
pub fn eql(self: @This(), a: types.CompletionItem, b: types.CompletionItem) bool {
pub fn eql(self: @This(), a: types.CompletionItem, b: types.CompletionItem, b_index: usize) bool {
_ = self;
_ = b_index;
return std.mem.eql(u8, a.label, b.label);
}
};
@ -3078,7 +3078,6 @@ fn makeScopeInternal(allocator: std.mem.Allocator, context: ScopeContext, node_i
.asm_output,
.asm_input,
.error_value,
.@"anytype",
.multiline_string_literal,
.string_literal,
.enum_literal,

View File

@ -451,7 +451,6 @@ pub fn lastToken(tree: Ast, node: Ast.Node.Index) Ast.TokenIndex {
.error_value,
=> return datas[n].rhs + end_offset,
.@"anytype",
.anyframe_literal,
.char_literal,
.integer_literal,

View File

@ -778,9 +778,6 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
try await @asyncCall(child_frame, {}, writeNodeTokens, .{ builder, arena, store, asm_node.ast.template });
// TODO Inputs, outputs.
},
.@"anytype" => {
try writeToken(builder, main_token, .type);
},
.test_decl => {
if (analysis.getDocCommentTokenIndex(token_tags, main_token)) |doc|
try writeDocComments(builder, tree, doc);