-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message method #15
Comments
You're right, this kind of thing should be easy to do. And I think it is in this case: have you tried the Alternatively, you could compose your own error message using a combination of other methods from
|
Sorry - this is for when the parse is succeeding but I want to report errors detected later in the semantics. |
Oh, I see! Thanks for clarifying. I think your suggestion makes perfect sense. I can imagine exposing this kind of functionality in a couple of different ways. One option (as you suggested) would be to add it as a method on Anyway, I'll leave this one for Pat to look at on Monday. He's been working on improving the way error messages are displayed, so it's probably best if he adds this feature. Thanks again, Jonathan! |
Great, thanks. I'd vote for a method on Interval, because it only depends on info from the Interval. I've been stashing Intervals in the DOM because that's all i need so far. Another reason I haven't been using Nodes is because semantic actions get the current node as a dynamic this, which is subtle and not expressible in the Typescript type system and not available to ES6 lambda expressions. |
As of d376cf3, it's exposed via |
@JonathanMEdwards, would you mind opening a new issue with some more details about the problem with dynamic |
Upon reflection I think the current design is the best. It is certainly On Mon, Jun 1, 2015 at 6:36 AM, Patrick Dubroy notifications@github.com
|
I'd like to report syntax errors with line and column info. But ohm does not export
common.getLineAndColumnMessage
. I'd like to write something like the following function. Or even better it should be a method on Interval.The text was updated successfully, but these errors were encountered: