Closed rwtolbert closed 2 years ago
@rwtolbert, in the error recovery example in README, semia
doesn't really recover since it takes an empty expression ''
. I think you can try the same. Hope it helps.
# Recovery operator labels
semia ← '' { message "missing semicolon in assignment." }
stmtb ← (!(Stmt / 'else' / '}') .)* { message "invalid statement" }
condw ← &'==' ('==' RelExp)* / &'<' ('<' AddExp)* / (!')' .)*
I've been playing with the recovery options, in order to get more specific error messages, but now I realize that I don't really want "recovery" and continued parsing.
I'm not parsing an entire document, so I want the parser to fail and return false but with my custom error messages in place of the default.
Is this even possible?