Skip to content
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

Listeners should have visitErrorNode throw an exception by default #46

Open
incident-recipient opened this issue Oct 4, 2022 · 1 comment

Comments

@incident-recipient
Copy link
Collaborator

It is possible to get a false positive if errorNodes are encountered. The default implementation is to do nothing. The user can implement an exception to be thrown manually, but I'm concerned that it will be easy to forget and lead to difficult to diagnose bugs.

I'm going to see if this can be built into the generated code ANTLR produces with its "tool" code.

@incident-recipient
Copy link
Collaborator Author

I was having difficulty getting tests in ANTLR to pass with my modifications, although I didn't have a dedicated amount of time to devote to the problem.

A stopgap solution might be to have PDSL log a severe error if it notices any nodes are error nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant