Several tweaks to RegexGenerator (the tool, not the emitted code)#60667
Merged
stephentoub merged 1 commit intodotnet:mainfrom Oct 21, 2021
Merged
Several tweaks to RegexGenerator (the tool, not the emitted code)#60667stephentoub merged 1 commit intodotnet:mainfrom
stephentoub merged 1 commit intodotnet:mainfrom
Conversation
Member
stephentoub
commented
Oct 20, 2021
- Fixed a bunch of nullable reference types warnings (they're suppressed as a netstandard2.0 project, but I temporarily and locally compiled it for netcoreapp current to get clean)
- Fixed the comparer used to aid in avoiding recomputing regexes when typing
- Added a hook to start exploring code gen for NonBacktracking
|
Tagging subscribers to this area: @eerhardt, @dotnet/area-system-text-regularexpressions Issue Details
|
- Fixed a bunch of nullable reference types warnings (they're suppressed as a netstandard2.0 project, but I temporarily and locally compiled it for netcoreapp current to get clean) - Fixed the comparer used to aid in avoiding recomputing regexes when typing - Added a hook to start exploring code gen for NonBacktracking
a309055 to
42a761e
Compare
stephentoub
commented
Oct 20, 2021
eerhardt
approved these changes
Oct 21, 2021
Member
eerhardt
left a comment
There was a problem hiding this comment.
Just one question. LGTM otherwise.
| } | ||
| private static bool SupportsCustomCodeGeneration(RegexMethod rm) => | ||
| // The generator doesn't currently know how to emit code for NonBacktracking. | ||
| (rm.Options & RegexOptions.NonBacktracking) == 0; |
Member
There was a problem hiding this comment.
What about invalid options? Before we would return false, but now we would return true.
Member
Author
There was a problem hiding this comment.
They're weeded out in the parser here:
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.