Properly handle side-effects in matchers #12
Labels
bug
Something isn't working
med-effort
Requires medium effort/time
med-prio
Medium priority issue/task
tech-debt
Technical debt that is overdue
Capturer
is a matcher with side-effects. The side-effects are applied when aCapturer
submatcher matches. However, they should only be applied when the whole matcher matches.Example:
The first
Capture
matcher is always executed, but the first option will fail. However, the state will already be modified.The second
Capture
will succeed, but it will operate on the incorrectly modified state from the firstCapture
.Since matchers are allowed to have side-effect, such side-effects should be properly supported.
The text was updated successfully, but these errors were encountered: