-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label for separator in AT_LEAST_ONE_SEP/MANY_SEP #1131
Comments
I am actually interested in deprecating the _SEP variants. This is because they could now be accomplished by composing the basic building blocks. Maybe something like: class Foo {
MANY_SEP_LABEL(idx, {ELEMENT, SEP, LABEL}) {
this.option(idx + 10, () => {
ELEMENT();
})
this.many(idx + 10, () => {
this.consume(idx + 10, SEP, {LABEL:LABEL})
ELEMENT();
})
}
}
The tricky part is that while Chevrotain DSL is now composable the limitation on |
Seems like the max indice is 255. |
That makes sense. Feel free to close this if that's the way forward. |
Feel free to share/consult on your "macros" implementations particularly as there are no docs/examples for this yet. |
As far as I can tell there's no way to label the
SEP
inAT_LEAST_ONE_SEP
/MANY_SEP
. Sometimes it would be convenient to do so.Maybe something like
SEP_LABEL
orLABEL_SEP
?The text was updated successfully, but these errors were encountered: