Java ASTNode Visitor for RUBY parser question [message #1697717] |
Sun, 07 June 2015 02:49  |
Eclipse User |
|
|
|
searched high and low and can't seem to find the answer or any examples.
I am using Java ruby DLTK
I want to parse a string that has Ruby source code (.rb file). I am using it this way:
JRubySourceParser jRubyParser = new JRubySourceParser();
ModuleDeclaration result = jRubyParser.parse(getSampleStr());
ASTNode parent = result.getChilds().get(0)
Now I am stuck. I don't know how to traverse the ASTNode using a visitor. I don't want to use getChilds.
The end goal is, to get all Method Names, Classes, require files, include files, and make them into a visible tree (which I already know how to).
Is there any examples that I have missed?
Thank you.
|
|
|
|
Powered by
FUDForum. Page generated in 0.28341 seconds