-
Notifications
You must be signed in to change notification settings - Fork 49
[5.7] Fix a few DSL APIs #583
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
[5.7] Fix a few DSL APIs #583
Conversation
Remove the DSL -> _CharacterClassModel conversion, and _CharacterClassModel's custom character class matching logic, none of which is being used.
`makeDSLTreeCharacterClass` was the last API that required it to be public. Remove it, and replace it with some static members on `_AST.Atom`.
Map to `.newlineSequence` instead of `.newline`, which allows it to create the correct consumer. rdar://96330096
Explicitly disambiguate the fact we're talking about `.`, which does not match newlines unless in single line mode.
This time as a "true any" that matches any character, including newlines.
This should map to `.any`, not `.dot`. rdar://96509234
This enum will start including cases that only the DSL can use, so move it off the AST.
Introduce `startOfInput` and `endOfInput` assertion kinds, and map the DSL to them such that they do not depend on matching options. rdar://97029630
rdar://97029702
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Explanation: Scope: Resolves: Risk: Reviewed By: Testing: |
@swift-ci please test |
5.7 cherry-pick of #578 + #580
Fix
CharacterClass.newlineSequence
such that it doesn't crash,CharacterClass.any
such that it matches newlines, and implementCharacterClass.anyNonNewline
.Also fix
Anchor.startOfLine
andAnchor.endOfLine
such that they always match newlines.Resolves #537
Resolves #553
Resolves #571
Resolves #539
Resolves rdar://97029702