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
parsley.ometa.runtime.ParseError has a very nice way of formatting / printing error messages
It would be nice if there was some way to access this from the grammar rules. For example, if there was a type of exception that would be picked up and have the line and character added.
Also, it would be nice if there was a way to emit a warning with a given message formatted in the same way as the ParseError.
(This can kinda-sorta be achieved via print str(grammar.input.head()[1].withMessage("whatever warning"), but there doesn't seem to be a way to get access to the grammar object itself from inside a rule.)
The text was updated successfully, but these errors were encountered:
parsley.ometa.runtime.ParseError has a very nice way of formatting / printing error messages
It would be nice if there was some way to access this from the grammar rules. For example, if there was a type of exception that would be picked up and have the line and character added.
Also, it would be nice if there was a way to emit a warning with a given message formatted in the same way as the ParseError.
(This can kinda-sorta be achieved via
print str(grammar.input.head()[1].withMessage("whatever warning")
, but there doesn't seem to be a way to get access to the grammar object itself from inside a rule.)The text was updated successfully, but these errors were encountered: