You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) Give a little context before showing the snippet of the input and the failures / expectations
(2) Don't include a line number
E.g.,
Invalid operation prototype string:
myOperation(x, y
^
Expected ")"
(Thing (2) suggests that we should have a better API for getting messages out of a MatchFailure. At the moment you can either get a one-size-fits-all message via the message property, or build your own using the getRightmostFailures() method. It would be nice to add a getMessage method that lets you specify some options, e.g., mf.getMessage({includeLineNumbers: false, includeFluffyFailures: true, ...}).)
The text was updated successfully, but these errors were encountered:
Right now if you specify an invalid operation prototype string when you add an operation to a semantics, e.g.,
you'll get a generic Ohm error message like this:
which is not very nice.
A couple of things that would make it better:
(1) Give a little context before showing the snippet of the input and the failures / expectations
(2) Don't include a line number
E.g.,
(Thing (2) suggests that we should have a better API for getting messages out of a
MatchFailure
. At the moment you can either get a one-size-fits-all message via themessage
property, or build your own using thegetRightmostFailures()
method. It would be nice to add agetMessage
method that lets you specify some options, e.g.,mf.getMessage({includeLineNumbers: false, includeFluffyFailures: true, ...})
.)The text was updated successfully, but these errors were encountered: