parlot
parlot copied to clipboard
Can I read the delimiter of a Separated parser?
Say I do this:
var booleanDelimiter = OneOf(Terms.Text("and"), Terms.Text("or"));
Then I use that parser as the delimiter for a Separated
parser:
Separated(booleanDelimeter, filterClause).Then(v => // config my filter);
As part of the filter, I want to know if it was prefaced by an and
or an or
. To do this, I need to read from the booleanDelimiter
.
Is this possible? Or is there a better way?