using javac to parse module-info.java

Remi Forax forax at univ-mlv.fr
Sun Nov 20 18:50:52 UTC 2016


After having written my own parser of module-info.java and see it burn in flames because it doesn't manage unicodes and comments correctly, i've decided to directly use the javac parser for that.
I want to post the code here for several reason, one is that it can help others, the other is that it uses com.sun.source.tree and i'm not sure i use it in a kosher way.

https://gist.github.com/forax/5b8d52ac28db1126e2c1ed4e0461f550

regards,
Rémi

PS: it doesn't recognize the open directive because the version i use (b144) doesn't support it yet.



More information about the jigsaw-dev mailing list