Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] AST with comments

I'm trying to generate the comment nodes in the AST and this doesn't seem
to work.

ITranslationUnit tu = ...
IASTTranslationUnit ast = tu.getAST(null,ITranslationUnit.
ast.accept(new. MyASTVisitor3());

      class MyASTVisitor3 extends ASTVisitor {

            MyASTVisitor3() {
            public int visit(IASTComment cmt) {
                  System.out.println(."Visiting comment: "+cmt);
                  return PROCESS_CONTINUE;
Nothing gets visited. The same setup code works for visiting other nodes.
What am I doing wrong?


Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 745 West New Circle Road, Lexington, KY 40511

Back to the top