Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Differentiating all IASTDeclSpecifier
Differentiating all IASTDeclSpecifier [message #1726264] Thu, 10 March 2016 19:35
Nicolas Anquetil is currently offline Nicolas AnquetilFriend
Messages: 20
Registered: May 2010
Junior Member

I want to use CDT to parse a C++ project
I successfully created the IASTTranslationUnit, but when visiting it
(and children), I see that many node are visited by
public int visit(IASTDeclSpecifier node)

Looking for examples, I found other projects that solve this issue by
doing a list of
if (astNode instanceof XXX)

This does not seem like very good OO programming practice
is there no other way to do it?
Some method or attribute to check that would tell me what I need to know?
Or some way to tell the nodes to call the visitor on their real type?

Previous Topic:Eclipse is on a Flash Drive
Next Topic:Symbol 'std' could not be resolved and Symbol 'cout' could not be resolved.
Goto Forum:

Current Time: Sun Sep 25 08:31:40 GMT 2022

Powered by FUDForum. Page generated in 0.02045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top