Open lambdaknight opened 1 year ago
Also of note is that it seems like going one level deep into the parse tree isn't enough. A call to pairs.next().unwrap().into_inner()
returns the expr
just below program
, but it still has the EOI token in the Pairs
@segeljakt
.op(Op::postfix(Rule::EOI))
and
.map_postfix(|lhs, op| match op.as_rule() {
Rule::EOI => lhs,
seems to work :smile:
Describe the bug Pratt parser fails to parse a set of Pairs if EOI is included in them.
To Reproduce Steps to reproduce the behavior: 1) Modify the
derive/examples/calc.rs
example to not do the calls on lines 93-98.Expected behavior It should work?
Additional context Seems like EOI should be ignored or handled in some other way than requiring you to manually handle the parse tree for one level.