-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backtracking loops, backreferences, and if-then-else constructs t…
…o Regex "simplified" code gen (#61906) * Add a few tests for captures inside various constructs * Slightly optimize creation of multis that don't participate in case conversion * Add simple codegen support for backtracking Loops * Add simple codegen support for backreferences * Add simple codegen support for if-then-else backreference conditionals * Add simple codegen support for if-then-else expression conditionals * Flip default on MarkLabel emitting semicolon Labels need to be followed by something other than a closing brace. Previously I was trying to opt labels in to emitting a semi-colon, but it's too error prone. Instead, we now by default emit a semicolon, and only skip it from call sites that opt-out because it's obvious they'll always be followed by code. * Add simple codegen support for balancing groups * Address PR feedback
- Loading branch information
1 parent
48fe637
commit fc48852
Showing
9 changed files
with
896 additions
and
138 deletions.
There are no files selected for viewing
408 changes: 337 additions & 71 deletions
408
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
Large diffs are not rendered by default.
Oops, something went wrong.
419 changes: 400 additions & 19 deletions
419
...raries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters