swiftlang / swiftlang/swift-experimental-string-processing
Bring pretty printer up to date
Open
@Azoy is already working on this.
Since May 6, 2022.
- Dominant language
- Swift
- Stars
- 308
- Forks
- 52
- Avg merge
- 12h 45m
- Merged PRs (30d)
- 2
Description
The pretty printer converts a Regex defined in syntax into a RegexBuilder-style one, but it isn't up to date with the latest changes. This needs to be brought up to date, ideally with a validator that can take a regex and some input/output data, convert the regex to builder style, and then validate that both regexes have the same behavior.
For example, #"(?P)\w+ \d{2,} -"# converts to
Group(/* TODO: changeMatchingOptions */) {
Concatenation {
/* TODO: assertions */
OneOrMore(.eager) {
.wordCharacter
}
"-"
}
}
instead of
Regex {
Anchor.startOfInput
OneOrMore(.eager) {
CharacterClass.wordCharacter
}
"-"
}.asciiOnlyCharacterClasses()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.