...
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user