Update analysis.zig
This commit is contained in:
parent
4d0ab8b1aa
commit
015332b69e
@ -2542,17 +2542,21 @@ fn makeInnerScope(allocator: std.mem.Allocator, context: ScopeContext, node_idx:
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (container_field) |_| {
|
if (container_field) |_| {
|
||||||
if (!std.mem.eql(u8, name, "_") and !std.mem.eql(u8, name, "other")) {
|
if (!std.mem.eql(u8, name, "_")) {
|
||||||
try context.enums.put(allocator, .{
|
var doc = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs|
|
||||||
|
types.MarkupContent{ .kind = .Markdown, .value = docs }
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
var gop_res = try context.enums.getOrPut(allocator, .{
|
||||||
.label = name,
|
.label = name,
|
||||||
.kind = .Constant,
|
.kind = .Constant,
|
||||||
.insertText = name,
|
.insertText = name,
|
||||||
.insertTextFormat = .PlainText,
|
.insertTextFormat = .PlainText,
|
||||||
.documentation = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs|
|
.documentation = doc
|
||||||
types.MarkupContent{ .kind = .Markdown, .value = docs }
|
});
|
||||||
else
|
if (gop_res.found_existing) {
|
||||||
null,
|
if (doc) |d| allocator.free(d.value);
|
||||||
}, {});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user