Skip to content

[5.7] Some trivia fixes #445

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

Conversation

hamishknight
Copy link
Contributor

5.7 cherry-pick of #431

Use this to replace the various places we're doing
`var src = self`.
We don't have to handle bailing early, the loop
will terminate if we don't lex another operator.
Make sure an inverted character class does not
dump the same as a regular character class.
`expectQuoted` expects non-empty contents, which
doesn't apply to comments.
PCRE does not allow whitespace here, instead
treating the sequence as literal if whitespace is
present. However this behavior is quite
unintuitive. Instead, lex whitespace between range
operands.
Previously we would only parse non-semantic
whitespace, but also expand to end-of-line
comments, which are supported by ICU.
Factor out the logic that deals with parsing an
individual character class member, and interleave
`lexTrivia` calls between range operand parsing.
@hamishknight hamishknight added the r5.7 5.7 Release Cherry Picks label May 27, 2022
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 8f0160b into swiftlang:swift/release/5.7 Jun 1, 2022
@hamishknight hamishknight deleted the trivia-pursuit-5.7 branch June 1, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r5.7 5.7 Release Cherry Picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants