Closed matozoid closed 1 year ago
please review and merge this.
Ok, will this break the intellij plugin for antlr? Could you tweak that one too?
no, it does not break the plugin even with the latest antlr, but it is a positive fixing of this project anyway.
thanks!
And thanks!
Why is my VOCABULARY
not an array?
(antlr 4.12.0)
@oovm the PR has been merged but the change has not been released yet, so in antlr4-intellij-adaptor 0.1 you still have to use something like:
PSIElementTypeFactory.defineLanguageIElementTypes(
ANTLRv4Language.INSTANCE,
ANTLRv4Lexer.tokenNames,
ANTLRv4Parser.ruleNames
);
The latest ANTLR deprecates ...Parser.tokenNames. It is used in this project like so:
This PR changes that to use the suggested replacement instead:
Part of this change comes from https://github.com/kshchepanovskyi/antlr4-jetbrains-adapter/commit/48c4702725916bb0c8c84fdf0cdadae032651b2b
This breaks the API, but it is pretty obvious for a user how to fix it, in my opinion.