[go_router_builder] Support nested parentheses, groups, and lookaround assertions in path parameters - #12764
Open
MaximeRougieux wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors path parameter parsing in path_utils.dart to support nested parentheses, grouping constructs, and lookahead assertions by replacing the previous regular expression with a custom scanning mechanism. It also adds corresponding unit tests and bumps the package version to 4.4.1. Feedback is provided regarding a missing import for package:collection/collection.dart which is required for the firstOrNull extension getter.
| // found in the LICENSE file. | ||
|
|
||
| final RegExp _parameterRegExp = RegExp(r':(\w+)(\((?:\\.|[^\\()])+\))?'); | ||
| final RegExp _parameterNameRegExp = RegExp(r':(\w+)'); |
Contributor
There was a problem hiding this comment.
The firstOrNull extension getter is used on line 33, but package:collection/collection.dart is not imported in this file. This will cause a compile-time error. Please add the import at the top of the file.
Suggested change
| final RegExp _parameterNameRegExp = RegExp(r':(\w+)'); | |
| import 'package:collection/collection.dart'; | |
| final RegExp _parameterNameRegExp = RegExp(r':(\w+)'); |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See #12571 for details about the changes
Pre-Review Checklist
[shared_preferences]///).