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

Look into Roaster #211

Open
vemv opened this issue Nov 11, 2023 · 0 comments
Open

Look into Roaster #211

vemv opened this issue Nov 11, 2023 · 0 comments
Assignees

Comments

@vemv
Copy link
Member

vemv commented Nov 11, 2023

https://github.com/forge/roaster is a Java parser that appears to be much faster than JDK's (1-20ms vs. N seconds).

It's based on Eclipse JDT.

It also seems less picky e.g. it can parse Lomboked classes.

Sample usage was easy:

(time (do (Roaster/parse (io/resource (orchard.java.parser-utils/source-path `Thread))) nil))

JDT doesn't seem to return DocCommentTree instances. But maybe one could create an artificial one by:

  • creating a fictional class with a single method
  • place the doc comment (as parsed by JDT) there
  • parse it as usual

...it may or may not be error-prone - worth checking.

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

No branches or pull requests

1 participant