gwenn / lemon-rs

LALR(1) parser generator for Rust based on Lemon + SQL parser
The Unlicense
48 stars 10 forks source link

improve parser error handling #20

Closed MarinPostma closed 1 year ago

MarinPostma commented 1 year ago

This PR improves the parser error handling, by defining a proper ParserError enum that lets the user build custom error messages.

Previously error message (especially syntax error) where rather cryptic, this is an improvement over:

 near ID, "Some("selectx")": syntax error at (1, 8)
gwenn commented 1 year ago

Version 0.6.0 released.