Skip to content

Conform Substring to RegexProtocol #152

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 1 commit into from
Feb 10, 2022

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Feb 10, 2022

Currently String conforms but Substring doesn't. I don't see a reason Substring shouldn't be usable in a DSL builder block, so adding this conformance.

@rxwei rxwei requested a review from milseman February 10, 2022 09:36
@rxwei
Copy link
Contributor Author

rxwei commented Feb 10, 2022

@swift-ci please test Linux

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this instead be constructing a DSLTree? Also, I'd probably go with a .quotedLiteral instead of a concatenation of atoms inside the DSL. (Inside the AST it would affect printing, but for the DSL I think it's the right call).

@rxwei
Copy link
Contributor Author

rxwei commented Feb 10, 2022

Good point. I think it should and will modify it in a new PR.

@rxwei rxwei merged commit 03f19fe into swiftlang:main Feb 10, 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.

2 participants