#408 get the javacode from an AST-Node

release_4.2
closed
nobody
None
5
2016-06-25
2006-02-01
No

Hello!

I try to write new checks. For this i have to parse the
first line of code in a method.

Is there any possibility for getting the java-code from
an AST (containing the childs of this AST) or have I to
create the source-code by iterating the AST-structure?

The easiest way is to implement a method in every AST,
which returns the source-code like:
public String getSourceCode()

If the parser-classes does not support this, it could
be implemented in the class DetailAST.

This would make the creation of some checks much easier.

Best regards,
Matthias Herp

Discussion

  • Roman Ivanov

    Roman Ivanov - 2016-06-25
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks