How to access comments from the java compiler tree api generated ast?

前端 未结 5 2216
清歌不尽
清歌不尽 2020-12-30 17:37

I\'ve used the java compiler tree api to generate the ast for java source files. However, i\'m unable to access th comments in the source files.

So far, i\'ve been

5条回答
  •  长发绾君心
    2020-12-30 18:08

    Managed to solve the problem by using the getsourceposition() and some string manipulation (no regex was needed)

提交回复
热议问题