-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to this commit, the regexes in substitution.go file were hard to understand and hard to reuse because of the complexity of the regexes. For example, we have to consider - all the three notations (dot notation, bracket with single quote, and bracket with double quote) - the suffix of indexing part including start operator and int indexing that was not included before. Also the old regex coupled each notation part with the indexing part, which leads to extra step to be done in the extract-related functions i.e. have to trim the [*] every time. In this fix, we clean up the regexes and make it as much reable and reuseble as possible. There will be more PRs to come to clean up considering the complexity of the all regexes in substitution.go and its usage everywhere. Also results-related regexes in resultref.go file need cleanup too.
- Loading branch information
Showing
4 changed files
with
116 additions
and
44 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
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