First, I have to mention that I'm very happy that you chose to explore antlr! ...looking at what you've done here, you now know more about Visitor
and ErrorNode
than I do!
But ANTLR aside...
Classes are internal
unless specified otherwise Classes are internal
unless specified otherwise; still it would be nice to be explicit about it, and stick that internal
modifier in front of your internal
classes.
I don't like the name you've chosen for ThrowExceptionErrorListener
- it makes the type's name sound like a method, as throw is a verb, and class names should be nouns. How about ThrowingErrorListener
?
I'm not sure about this line here:
lexer.RemoveErrorListeners();
You just instantiated it, does it come with error listeners for free? If so, that deserves a comment. If not, then that line could be removed.
First, I have to mention that I'm very happy that you chose to explore antlr! ...looking at what you've done here, you now know more about Visitor
and ErrorNode
than I do!
But ANTLR aside...
Classes are internal
unless specified otherwise; still it would be nice to be explicit about it, and stick that internal
modifier in front of your internal
classes.
I don't like the name you've chosen for ThrowExceptionErrorListener
- it makes the type's name sound like a method, as throw is a verb, and class names should be nouns. How about ThrowingErrorListener
?
I'm not sure about this line here:
lexer.RemoveErrorListeners();
You just instantiated it, does it come with error listeners for free? If so, that deserves a comment. If not, then that line could be removed.
First, I have to mention that I'm very happy that you chose to explore antlr! ...looking at what you've done here, you now know more about Visitor
and ErrorNode
than I do!
But ANTLR aside...
Classes are internal
unless specified otherwise; still it would be nice to be explicit about it, and stick that internal
modifier in front of your internal
classes.
I don't like the name you've chosen for ThrowExceptionErrorListener
- it makes the type's name sound like a method, as throw is a verb, and class names should be nouns. How about ThrowingErrorListener
?
I'm not sure about this line here:
lexer.RemoveErrorListeners();
You just instantiated it, does it come with error listeners for free? If so, that deserves a comment. If not, then that line could be removed.
First, I have to mention that I'm very happy that you chose to explore antlr! ...looking at what you've done here, you now know more about Visitor
and ErrorNode
than I do!
But ANTLR aside...
Classes are internal
unless specified otherwise; still it would be nice to be explicit about it, and stick that internal
modifier in front of your internal
classes.
I don't like the name you've chosen for ThrowExceptionErrorListener
- it makes the type's name sound like a method, as throw is a verb, and class names should be nouns. How about ThrowingErrorListener
?
I'm not sure about this line here:
lexer.RemoveErrorListeners();
You just instantiated it, does it come with error listeners for free? If so, that deserves a comment. If not, then that line could be removed.