Skip to content

[SR-5626] [SourceKit] Include name range in subscript structure #48196

@marcelofabri

Description

@marcelofabri
Previous ID SR-5626
Radar None
Original Reporter @marcelofabri
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Improvement
Assignee @nkcsgexi
Priority Medium

md5: 9175a59a48621f4bbf14108ac4dbcedc

Issue Description:

#11258 added support for source.lang.swift.decl.function.subscript in a structure.

However, key.nameoffset and key.namelength are both 0.

I'm willing to send a PR, but I need some help on how to find the name length (or end). I was able to find the arrow start (but this would make the name length larger than needed).

I also tried using the parameters (similar how it's done in SourceRange AbstractFunctionDecl::getSignatureSourceRange()), but it didn't include the right parentheses for some reason (so the length is shorter than expected).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions