Replies: 1 comment 1 reply
-
Which one is the top-level rule to run? One thing I can't see in the grammar is something that would match |
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
-
TL;DR: How do I get this working
I'm trying to write a Pest grammar to parse MapCSS (no definitive formal specification, but most information can be found here), and I'm struggling with a part of grammar.
Part of the syntax is that you can write conditions such as
[building=residential]
or[width<10]
(similar to attribute selectors in normal CSS). I have a list of such selectors in the grammar (all looking something likecondition_equality = { tag ~ "=" ~ value }
but with different operators and sometimes a different right side sub-rule), but based on the error I get not all conditions are considered.The relevant part of the code is here
Beta Was this translation helpful? Give feedback.
All reactions