-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Vim syntax improvements #2886
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
Vim syntax improvements #2886
Conversation
This was duplicating the swiftTypeName. However, the swiftTypeName is more generically named and applies to both types and functions both in structure and usage. Retain the single definition.
Remove modifiers from the keywords into the modifiers section. Remove type specifiers from the keyword group.
\ start="<" end=">" | ||
syn match swiftArchetype contained skipwhite nextgroup=swiftTypeDeclaration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code trying to match the conformance constraints?
func foo<T : X, T.U : Y>() {}
^^^^^ ^^^^^^^^
The constrained type can be a nested one, so I'm not sure that swiftVarName
would work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, though the Archetype was matching the same way as a VarName. In fact, this is related to the reason for the previously stated "bug". We don't mark the type decl as being contained (because we have no way to contain it in the function parameter list). A VarName is a pattern of [: Type].
That said, with the trailing constraints, I think that the lifetime for this matching is limited anyways.
My comment about |
[pull] swiftwasm from main
What's in this pull request?
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.