Skip to content

[5.7] Update API for congruence with Unicode proposal #316

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

natecook1000
Copy link
Member

This updates two API points to align with the Unicode for String Processing proposal:

  • Adds a anyUnicodeScalar static property to RegexBuilder.CharacterClass — this functionality is already available via regex syntax as \O.
  • Changes reluctantQuantifiers() to a repetitionBehavior(_:) method that takes the preferred behavior for the modified regex. This includes a move of the QuantificationBehavior type from the RegexBuilder module to the _StringProcessing module, and a rename to RegexRepetitionBehavior.

This provides a RegexBuilder API that represents the same as `\O`
in regex syntax.
This also moves QuantificationBehavior from the RegexBuilder module
down to _StringProcessing, and renames it to RegexRepetitionBehavior.
This will go back when 182da3b is
merged into the 5.7 branch.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit fc46753 into swiftlang:swift/release/5.7 Apr 22, 2022
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.

3 participants