I have something non-atomic and I don't want it's children generating tokens #638
rsnakard-r7
started this conversation in
General
Replies: 2 comments
-
I wonder if you could clarify why you don't want it to be atomic? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, this is one of the main pain points we want to address with the next major version of pest. (Unfortunately, it's kind of stalled currently.) The multiple implications of each of the modifiers (and only being able to state one) doesn't least to composable control over behavior. The current advice would be to just recognize the string rule when consuming the parse tree and not recursing into it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm parsing quoted strings. When I receive a quoted string I want to receive it as one big chunk, I don't need to see the tokens that comprise it. It's very frustrating.
If I'm parsing
The quick brown "fox jumps over the" lazy dog
I would like to receive the tokensThis will make processing much easier as I can match against
Rule::segment
without worrying if it's inner of thequoted_string
or not. I realize I have the option of adding a wrapper ruleThis will allow me to match against
quoted_string
andunquoted_string
without fear but it does leave my iterator clogged up with lots of segments that I just don't need.There is currently no way to mark
quoted_string
as "not atomic but don't generate tokens for my children" and there is currently no way to marksegment
as "atomic but don't generate tokens for me". One of these two features is necessary for my use caseBeta Was this translation helpful? Give feedback.
All reactions