pawandubey/pegasus

Better Errors

pawandubey opened this issue · 0 comments

Currently, the error reporting mechanism is not ideal. We return a true/false result but we provide no extra info when a parse fails.

Ideally, upon failure, we should return:

  • The position (line/col) where the match failed.
  • What was expected to be matched
  • What was actually encountered