Closed phallstrom closed 4 years ago
How is this a parslet issue?
@kschiess I'm confused. I'm using the parslet gem and have a question/issue about how to capture some of the results -- specifically if a smaller rule uses as
it doesn't seem possible to use as
at a higher level.
It is possible. Add more .as in the lower level, as described here: http://kschiess.github.io/parslet/get-started.html (Tree output).
Or maybe ask the question on Stack Overflow?
Yeah, for my case, I'm extending an existing parser so do not want to touch the lower levels. I really want a override all the lower level stuff and use my :as instead
. Sounds like that isn't a feature of parslet right now.
I'm not sure how to explain this so will provide an example of what I want. Can't figure out if what I want is possible or not...
When run the output is:
What I'd like is for it to be this.
Some way to replace that
as(:variable)
with aignore any as's inside this thing and just use the whole matched string as :variable
. Is this possible, without removing the.as(:sign)
?