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
In the error handler we currently get something like:
err.OMeta = { idx: 0, line: 1, col: 0 }
Is it possible to give us a way of knowing which production rule was the one that failed? Perhaps even a stack trace of the production rule, so we can know how deep the production rule went before failing?
The text was updated successfully, but these errors were encountered:
Sadly it's not that easy due to the backtracking nature of OMeta meaning that it's not possible to know which rule was the one that was meant to succeed (as there are usually multiple possible branches, and any of them might be "the one").
What you can do is to enable branch tracking and see what branches are tracked
You might well find that you need to backtrack from the idx that the error happened to find a tracked rule (since it tracks where the rule started matching). As for the grammar.branches object, you can use it with the hinter module to generate autocomplete (sadly I don't have an example available, but if this is useful to you I can try to get one sorted).
In the error handler we currently get something like:
Is it possible to give us a way of knowing which production rule was the one that failed? Perhaps even a stack trace of the production rule, so we can know how deep the production rule went before failing?
The text was updated successfully, but these errors were encountered: