antlr4
antlr4 copied to clipboard
Added an option to generate the context classes final.
Well, I was trying to test some Java 21 features, when it hit me that the generated Context classes are not final, so I can't simply just announce a sealed super class for them.
This is a trivial fix for the issue. Other languages could benefit from this final-ization as well, however I'm not good enough in them, to take that responsibility.
Might be a step for #4310
@parrt Any chance to get this one reviewed?
Hi @lkishalmi It sounds reasonable but my mind it has been elsewhere for a while and I just don't know the latest java stuff; I'm also sure how it should be broadcast across other targets. Sorry!