Replies: 1 comment 1 reply
-
|
UPDATE: Apparently the compound-atomic ( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've come across a behavior that I'm not sure is a bug or not (hence why I'm not posting it as a bug). It seems that behavior is at least not consistent with my understanding of pest, but as I'm new to pest it's likely that it's PEBKAC. Anyway, I'm currently using the following idiom in order to avoid too many recursions in my code, e.g.:
Where the idea is to use atomic rules and then punch holes in them with non-atomic rules so I can match those. Now, this works just fine for the most part (I have like 8-9 rules where I do this), but then suddenly it fails for a specific rule, i.e.:
The interesting part is that if I remove the
!then it matches just fine (I just don't get the token, etc.):It also works if I use a compound-atomic rule (my current workaround), i.e.:
This doesn't really make sense to me as it feels like the behavior is not consistent across the board, but is it a bug or am I simply misunderstanding how pest works? The error message I get is the following:
See the complete grammar below, i.e. definition of
numberandWHITESPACEin order to be properly baffled like me, or to explain to me what I'm doing wrong!For information, I'm using pest 2.8.4, the following is my complete grammar (see comment for the specific rules that work/doesn't work):
Beta Was this translation helpful? Give feedback.
All reactions