Currently the literals section of the book gives this as a string example:
string = { "\"" ~ (raw_string | escape)* ~ "\"" }
Is my understanding correct that this will parse " USA" as USA, discarding the initial , because the rule isn't atomic?
I'm having this issue myself. I'm getting around it by making the rule atomic, but it seems rules can't be atomic & silent, and so the parse tree contains the "s, which requires a bit more work downstream.
Thanks!
Originally posted by @max-sixty in pest-parser/pest#645
Currently the literals section of the book gives this as a string example:
Is my understanding correct that this will parse
" USA"asUSA, discarding the initial, because the rule isn't atomic?I'm having this issue myself. I'm getting around it by making the rule atomic, but it seems rules can't be atomic & silent, and so the parse tree contains the
"s, which requires a bit more work downstream.Thanks!
Originally posted by @max-sixty in pest-parser/pest#645