kamadorueda / santiago

Santiago is a lexing and parsing toolkit for Rust
92 stars 7 forks source link

What is the proper way to handle errors in the parser ? #4

Closed springcomp closed 1 year ago

springcomp commented 1 year ago

I have tried using a Grammar<AST> but I have a couple of Lexemes that may fail.

I have tries using a Grammar<Result<AST, Error>> but that complicates things dramatically ? The parser now returns wrapped results. Is there a proper way to handle errors while parsing?