Skip to content

Look into Roaster #211

@vemv

Description

@vemv

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions