This commit is contained in:
agra
2026-02-26 00:18:36 +02:00
parent f0569a8a3e
commit 7209e8e69d
6 changed files with 299 additions and 144 deletions

View File

@@ -1268,7 +1268,6 @@ pub fn findNodeAtOffset(node: *Node, offset: u32) ?*Node {
.library_decl,
.function_type_expr,
.enum_decl,
.struct_decl,
.union_decl,
.import_decl,
.c_import_decl,
@@ -1286,6 +1285,11 @@ pub fn findNodeAtOffset(node: *Node, offset: u32) ?*Node {
.ufcs_alias,
.closure_type_expr,
=> {},
.struct_decl => |sd| {
for (sd.methods) |method_node| {
if (findNodeAtOffset(method_node, offset)) |found| return found;
}
},
.protocol_decl => |pd| {
for (pd.methods) |method| {
if (method.default_body) |body| {