-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-7933] SourceKit double-counts escaping and autoclosure attributes #50468
Labels
Comments
Comment by Nathan Hitchings (JIRA) Based on the description, I gather that the syntax map should look like this: {
key.offset: 0,
key.length: 125,
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
key.syntaxmap: [
...,
{
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
key.offset: 12,
key.length: 9
},
...,
{
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
key.offset: 37,
key.length: 18
},
...,
{
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
key.offset: 97,
key.length: 12
},
...
]
} Is that correct? |
That looks correct to me! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Additional Detail from JIRA
md5: 065c0c3c9adc792d7d7203c32bd04ee2
Issue Description:
The
@escaping
and@autoclosure
attributes are mapped differently from other attributes. For example, given this source code:SourceKit yields this syntax map (unrelated pieces elided):
The "source.lang.swift.syntaxtype.attribute.builtin" keys should have the offset and length of the "source.lang.swift.syntaxtype.attribute.id" keys, which in turn shouldn't be emitted.
The text was updated successfully, but these errors were encountered: