Skip to content

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

Merged
merged 11 commits into from
Jun 5, 2016
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jun 4, 2016

What's in this pull request?

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

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

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

compnerd added 11 commits June 4, 2016 11:35
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
Copy link
Contributor

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.

Copy link
Member Author

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.

@gribozavr
Copy link
Contributor

My comment about swiftVarName is not pointing out a regression, so I'm merging this PR. Thanks!

@gribozavr gribozavr merged commit 1752b11 into swiftlang:master Jun 5, 2016
@compnerd compnerd deleted the vim-syntax-improvements branch July 3, 2016 17:25
MaxDesiatov pushed a commit that referenced this pull request Apr 19, 2021
[pull] swiftwasm from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants