parlot icon indicating copy to clipboard operation
parlot copied to clipboard

Can I read the delimiter of a Separated parser?

Open deanebarker opened this issue 1 year ago • 2 comments

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?

deanebarker avatar Nov 03 '22 14:11 deanebarker