softdevteam / lrpar

Rust LR parser
Other
1 stars 0 forks source link

Update the API to deal with the case where we can't find any repairs. #37

Closed ltratt closed 6 years ago

ltratt commented 6 years ago

Some errors are so bad that we can't find suitable repairs, at which point it's impossible to return a parse tree (it would, at best, be only a partial tree). It therefore seems safest to say that, when an error occurs, the user may, or may not, get back a parse tree too.

This might require a tweak to Diffract, although given that I don't think it does anything with the Err clause yet, it might not.

snim2 commented 6 years ago

Looks OK, apart from that brief comment.

ltratt commented 6 years ago

If that looks good to you, I can squash?

snim2 commented 6 years ago

Please do!

ltratt commented 6 years ago

Squashed.