-
Notifications
You must be signed in to change notification settings - Fork 332
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
Simplified names for map functions in AbstractAntlrListener.java #1180
Conversation
What's the difference between |
And what about |
mapRange indeed only changes the token length. I will check with the maintainers later today, if there is any reason to keep it. Map terminal is used to map terminal nodes (The nodes created for the tokens defined in the lexer file) of antlr. Sadly the only way to identify them is using integer constants defined by antlr. Writing the listener manually, you can handle them in the visitTerminal method. For example the kotlin language modules used that to extract tokens like "BREAK". Using the mapTerminal method, that can be done using the new framework: this.mapTerminal(KotlinParser.BREAK, BREAK); |
[JPlag Plagiarism Detector] Kudos, SonarCloud Quality Gate passed! |
Looks good. Only thing missing is what we discussed in #1159 |
@TwoOfTwelve should we merge this PR now and address the changes discussed above in another PR? Or do we want to include it here? |
@tsaglam please merge this, I'm starting work on the C++ semantic tokens based on it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TwoOfTwelve Lets move the other issues discussed here into another PR!
Simplified the names of the mapping functions in AbstractAntlrListener