Skip to content

Generalize "InVarOrLetPattern" to "PatternContext" #859

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 2 commits into from
Sep 29, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Sep 29, 2022

The legacy parser maintains a stack of contexts that determine whether a matching pattern is being parsed, and whether a let or var is the introducer. This turns on and off a particular production in expression parsing that helps to meld patterns like

Optional<String>.none

into shape depending on whether it comes after the keyword "case" or after "let" or "var".

The legacy parser maintains a stack of contexts that determine whether a matching pattern is being parsed, and whether a let or var is the introducer. This turns on and off a particular production in expression parsing that helps to meld patterns like

`Optional<String>.none`

into shape depending on whether it comes after the keyword "case" or after "let" or "var".
@CodaFi CodaFi requested a review from ahoppen as a code owner September 29, 2022 00:29
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 29, 2022

@swift-ci test

@CodaFi CodaFi merged commit 598ff22 into swiftlang:main Sep 29, 2022
@CodaFi CodaFi deleted the special-handling branch September 29, 2022 02:23
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.

1 participant