Closed Y-- closed 3 years ago
Thanks for this bug-fix, much appreciated. Error handling is an area I haven't really explored in any great depth yet.
Regarding your comments:
it seems that the assertion on error message isn't actually used (i.e. if I remove the "if" the tests are still green)
Sounds like a bug in as-pect - worth raising an issue? https://github.com/jtenner/as-pect
as you can see, in JS they repeat the expression: I wasn't quite sure if we wanted to keep a reference on the input in the Parser's constructor and reproduce this behavior
I'm not concerned about matching this behaviour exactly, especially as it would add more complexity to the code.
:tada: This PR is included in version 1.6.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Perfect, thanks a lot! ~Will try to submit an issue or PR to as-pect
then.~ edit: posted here: https://github.com/jtenner/as-pect/issues/332
And sounds perfectly reasonable to me regarding the message!
Hi!
Thanks for this cool library!
If you do not specify anything to "repeat", such as
"*m"
, here is what we have currently:This is the behavior in JS:
Couple notes with this PR:
input
in theParser
's constructor and reproduce this behaviorLet me know what you think, happy to update the code in any way!