-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compiler failing with nested
with
expression
The previous implementation of `WithParser` used regex, which struggles with parsing nested structures correctly. This commit improves `WithParser` to track and parse all nested `with` expressions. Other improvements: - Throw meaningful errors when syntax is wrong. Replacing the prior behavior of silently ignoring such issues. - Remove `I` prefix from related interfaces to align with newer code conventions. - Add more unit tests for `with` expression. - Improve documentation for templating. - `ExpressionRegexBuilder`: - Use words `capture` and `match` correctly. - Fix minor issues revealed by new and improved tests: - Change regex for matching anything except surrounding whitespaces. The new regex ensures that it works even without having any preceeding text. - Change regex for capturing pipelines. The old regex was only matching (non-greedy) first character of the pipeline in tests, new regex matches the full pipeline. - `ExpressionRegexBuilder.spec.ts`: - Ensure consistent way to define `describe` and `it` blocks. - Replace `expectRegex` tests, regex expectations test internal behavior of the class, not the external. - Simplified tests by eliminating the need for UUID suffixes/prefixes.
- Loading branch information
1 parent
dfd4451
commit 80821fc
Showing
7 changed files
with
958 additions
and
403 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
Oops, something went wrong.