Skip to content

[5.7] [Parse] Introduce /.../ regex literals #42352

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 7 commits into from
Apr 14, 2022

Conversation

hamishknight
Copy link
Contributor

5.7 cherry-pick of #42119 + #42340

Start parsing regex literals with /.../ delimiters when -enable-bare-slash-regex is passed. Additionally, introduce a -disable-experimental-string-processing frontend flag that disables experimental string processing, including /.../ literals.

rdar://83253726

This allows us to hold tentative diagnostics
independent of other diagnostic transactions.
Queue up diagnostics when lexing, waiting until
`Lexer::lex` is called before emitting them. This
allows us to re-lex without having to deal with
previously invalid tokens.
Change the flag to imply
'-enable-experimental-string-processing', and
and update some tests to start using it.
When forward slash regex is enabled, start emitting
an error on prefix operators containing the
`/` character.
This spelling is no longer used.
Start parsing regex literals with `/.../`
delimiters.

rdar://83253726
Introduce a frontend flag that disables
experimental string processing, including `/.../`
literals.
@hamishknight hamishknight requested a review from a team as a code owner April 13, 2022 19:30
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 20bdfaa into swiftlang:release/5.7 Apr 14, 2022
@hamishknight hamishknight deleted the regular-grammar-5.7 branch April 14, 2022 17:46
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants