Go to definition now works for captures

This commit is contained in:
Alexandros Naskos 2020-05-23 02:58:39 +03:00
parent 34adb4e22f
commit c895d7d8f6

View File

@ -200,6 +200,11 @@ pub fn getDeclNameToken(tree: *ast.Tree, node: *ast.Node) ?ast.TokenIndex {
const field = node.cast(ast.Node.ContainerField).?;
return field.name_token;
},
// We need identifier for captures
.Identifier => {
const ident = node.cast(ast.Node.Identifier).?;
return ident.token;
},
else => {},
}