Skip to content

Conversation

@xwu
Copy link
Collaborator

@xwu xwu commented May 9, 2020

Most of the changes are minor refactorings that could benefit the codebase regardless of the feature in question being implemented (such as typo corrections, minor renamings for clarity); I will extract those out for actual review.

Missing are any diagnostics improvements, IDE integration, or even tests. This PR is not intended for merging as-is. However, it does build, and the resultant compiler will accept the following:

if let x = [1, 2, 3].first where: { $0 > 2 } {
  print(x)
}

@xwu xwu changed the title [Proof of concept] Support optional labels for the first trailing closure [Proof of concept] Allow optional labels on the first trailing closure May 9, 2020
@xwu xwu force-pushed the labels-labels-labels branch from 2f7fb79 to e87afba Compare May 9, 2020 03:58
@DevAndArtist
Copy link
Contributor

Irrelevant to the actual feature, but the tooling that will eventually compute the syntax highlighting would need to be taught to not interpret where: as the where clause. Would that need to be part of this feature still?

Great work!

@xwu xwu changed the title [Proof of concept] Allow optional labels on the first trailing closure [Proof of concept] Support the use of optional labels for the first trailing closure May 11, 2020
@xwu xwu changed the base branch from master to main September 24, 2020 04:19
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