Skip to content

Commit

Permalink
Improve IndexOf handling in regex source generator / compiler (#77925)
Browse files Browse the repository at this point in the history
This PR does a few related things:
1. Consolidates _most_ (but not all) use of IndexOf variants into a single helper that can then be used from multiple locations to avoid code duplication and make it easier for us to extend in the future with additional IndexOf variants.
2. Stops using IndexOf when doing lazy backtracking in an optional.
3. Special-cases "any" repeaters to not do any character checking.
4. Adds use of IndexOf (via the new helper) into repeaters.
  • Loading branch information
stephentoub committed Nov 7, 2022
1 parent e7a304c commit 62e06de
Show file tree
Hide file tree
Showing 3 changed files with 433 additions and 392 deletions.

0 comments on commit 62e06de

Please sign in to comment.