[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] AST with comments
|
Markus changed how the comment nodes are generated in the new preprocessor.
The method ASTVisitor.visit(ASTComment) has been deprecated and replaced by
IASTTranslationUnit.getComments()
Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx
Beth Tibbitts
<tibbitts@xxxxxx.
com> To
Sent by: cdt-dev@xxxxxxxxxxx
cdt-dev-bounces@e cc
clipse.org
Subject
[cdt-dev] AST with comments
03/18/2008 11:22
AM
Please respond to
"CDT General
developers list."
<cdt-dev@eclipse.
org>
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_CREATE_COMMENT_NODES);
ast.accept(new. MyASTVisitor3());
class MyASTVisitor3 extends ASTVisitor {
MyASTVisitor3() {
super();
this.shouldVisitComments=true;
}
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
Beth Tibbitts (859) 243-4981 (TL 545-4981)
High Productivity Tools / Parallel Tools http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address: IBM Corp., 745 West New Circle Road, Lexington, KY 40511
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev