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

java-parser: New entrypoint lexAndParse to return both tokens and CST. #625

Merged

Conversation

max-schaefer
Copy link

What changed with this PR:

Provide an entrypoint that exposes both the CST and the underlying token array.

Alternatives

The token array could also be accessed through the parser object, which we could export instead, but that seems like an internal implementation detail which perhaps shouldn't be part of the API.

Finally, we could consider exporting the lexer, but then if I want to get both the CST and the tokens I have to lex twice, which seems wasteful.

@CLAassistant
Copy link

CLAassistant commented Nov 21, 2023

CLA assistant check
All committers have signed the CLA.

@DanielFran
Copy link
Member

@max-schaefer can you sign the CLA?

@max-schaefer
Copy link
Author

Yep, I'm looking into it (currently checking with my employer whether they are OK with me signing it).

@max-schaefer
Copy link
Author

CLA is signed.

@clementdessoude clementdessoude merged commit e53f3a4 into jhipster:main Nov 26, 2023
6 checks passed
@clementdessoude
Copy link
Contributor

Thanks for this addition @max-schaefer !

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

Successfully merging this pull request may close these issues.

4 participants