I think scope would solve a lot of the problems I’m running in to over here: How do I parse part of a document? - #2 by NullVoxPopuli
For example, I need to match all text (to ignore it), and then top of that, match all these other things that text includes every character from (and it’s the order and composition of those characters that make them significant)
For example, how do I make:
two
{{"two"}} and {{"three"}
three
be detected as
Glimmer(
Expression(String)
Expression(String)
)
Ignoring all the text?
In a normally glimmer parser, text gets its own Node, but since Lezer is for highlighting, I should be able to skip it, yeah?
The scope here is within the {{
and }}
I’d like to have my tokens / etc only applicable within those outermost tokens, and not parseable anywhere else.
As is, _+
for Text
overwrites everything, and no amount of precedence makes my grammar work.