-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
URLPattern: Collapse look-ahead loops into main parse loop.
This CL refactors the parser to use separate states instead of the previously implemented look-ahead loops. This fixes a bug where the look-ahead loops did not properly ignore characters within `{ }` pattern groupings. This CL also slightly improves handling for nesting `{ }` groupings even though they are not legal pattern syntax. It seems better to avoid getting confused on depth and let the later pattern compiler return a more predictable error. This CL also adds a number of additional comments and other cleanup. Bug: 1141510 Change-Id: Id6bc1b4a16390b9e878c6757582519997332bbc8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2951204 Commit-Queue: Ben Kelly <wanderview@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#892699}
- Loading branch information
1 parent
0bc96be
commit f66c35e
Showing
3 changed files
with
231 additions
and
123 deletions.
There are no files selected for viewing
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
Oops, something went wrong.