Your advice

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Your advice

Ming Cheng

public static int visit(IIndex index,IASTDeclarator dtor) {

        //JOptionPane.showMessageDialog(CurrentGui.getInstance().getGui().getMainFrame(), "IASTDeclarator", "INFO", JOptionPane.INFORMATION_MESSAGE);

        if (dtor instanceof CASTAmbiguousDeclarator) {

            CASTAmbiguousDeclarator cAmbiguousDeclarator = (CASTAmbiguousDeclarator) dtor;

            return visit(index, cAmbiguousDeclarator);

        } else if (dtor instanceof CASTArrayDeclarator) {

            CASTArrayDeclarator cArrayDeclarator = (CASTArrayDeclarator) dtor;

            return visit(index, cArrayDeclarator);

        } else if (dtor instanceof CASTFieldDeclarator) {

            CASTFieldDeclarator cFieldDeclarator = (CASTFieldDeclarator) dtor;

            return visit(index, cFieldDeclarator);

        } else if (dtor instanceof CASTFunctionDeclarator) {

 

….

 

 

Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?

 

If by interface then may look like:

 

public static int visit(IIndex index,IASTDeclarator dtor) {

        //JOptionPane.showMessageDialog(CurrentGui.getInstance().getGui().getMainFrame(), "IASTDeclarator", "INFO", JOptionPane.INFORMATION_MESSAGE);

        if (dtor instanceof ICASTAmbiguousDeclarator) {

            ICASTAmbiguousDeclarator cAmbiguousDeclarator = (ICASTAmbiguousDeclarator) dtor;

            return visit(index, cAmbiguousDeclarator);

        } else if (dtor instanceof ICASTArrayDeclarator) {

            ICASTArrayDeclarator cArrayDeclarator = (ICASTArrayDeclarator) dtor;

            return visit(index, cArrayDeclarator);

        } else if (dtor instanceof ICASTFieldDeclarator) {

            ICASTFieldDeclarator cFieldDeclarator = (ICASTFieldDeclarator) dtor;

            return visit(index, cFieldDeclarator);

        } else if (dtor instanceof ICASTFunctionDeclarator) {

 

….

 

Thanks.

Sent from Mail for Windows 10

 


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Jonah Graham


On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:


Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?


Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

Please submit a change to CDT containing your improvement to the visitor classes.

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng
so the ans should be ICASTAmbiguousDeclarator interfaces?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Tuesday, February 25, 2020 4:52 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 


On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:


Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?


Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

Please submit a change to CDT containing your improvement to the visitor classes.

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Jonah Graham
They are internal - use what you like if you are going to peek inside the API - I don't think it matters in this case but I would generally use the highest item in the hierarchy that serves my purposes. 

(BTW ICASTAmbiguousDeclarator does not exist, I assume you mean IASTAmbiguousDeclarator)
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 25 Feb 2020 at 20:54, Ming Cheng <[hidden email]> wrote:
so the ans should be ICASTAmbiguousDeclarator interfaces?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Tuesday, February 25, 2020 4:52 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 


On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:


Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?


Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

Please submit a change to CDT containing your improvement to the visitor classes.
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng
Hope I could understand your concern.

@Override
    public int visit(IASTDeclaration decl) {
        IASTDeclarationImplClass.visit(index, decl);
        return PROCESS_CONTINUE;
    }

Question is that how to know a declaration is class/struct/function as detail as possible yet without using internal iface/class?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Wednesday, February 26, 2020 2:45 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 
They are internal - use what you like if you are going to peek inside the API - I don't think it matters in this case but I would generally use the highest item in the hierarchy that serves my purposes. 

(BTW ICASTAmbiguousDeclarator does not exist, I assume you mean IASTAmbiguousDeclarator)
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 25 Feb 2020 at 20:54, Ming Cheng <[hidden email]> wrote:
so the ans should be ICASTAmbiguousDeclarator interfaces?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Tuesday, February 25, 2020 4:52 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 


On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:


Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?


Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

Please submit a change to CDT containing your improvement to the visitor classes.
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng
@Override
    public int visit(IASTDeclaration decl) {
        // how to get decl's lowest detail info?
        return PROCESS_CONTINUE;
    }


From: Ming Cheng <[hidden email]>
Sent: Wednesday, February 26, 2020 6:43 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 
Hope I could understand your concern.

@Override
    public int visit(IASTDeclaration decl) {
        IASTDeclarationImplClass.visit(index, decl);
        return PROCESS_CONTINUE;
    }

Question is that how to know a declaration is class/struct/function as detail as possible yet without using internal iface/class?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Wednesday, February 26, 2020 2:45 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 
They are internal - use what you like if you are going to peek inside the API - I don't think it matters in this case but I would generally use the highest item in the hierarchy that serves my purposes. 

(BTW ICASTAmbiguousDeclarator does not exist, I assume you mean IASTAmbiguousDeclarator)
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 25 Feb 2020 at 20:54, Ming Cheng <[hidden email]> wrote:
so the ans should be ICASTAmbiguousDeclarator interfaces?


From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Tuesday, February 25, 2020 4:52 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice
 


On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:


Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?


Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

Please submit a change to CDT containing your improvement to the visitor classes.
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng

Hi,

 

Hope I can close this thread asap.

 

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: Wednesday, February 26, 2020 2:44 PM
To: [hidden email]
Subject: Re: [cdt-dev] Your advice

 

@Override

    public int visit(IASTDeclaration decl) {

        // how to get decl's lowest detail info?

        return PROCESS_CONTINUE;

    }

 

From: Ming Cheng <[hidden email]>
Sent: Wednesday, February 26, 2020 6:43 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice

 

Hope I could understand your concern.

 

@Override

    public int visit(IASTDeclaration decl) {

        IASTDeclarationImplClass.visit(index, decl);

        return PROCESS_CONTINUE;

    }

 

Question is that how to know a declaration is class/struct/function as detail as possible yet without using internal iface/class?

 

From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Wednesday, February 26, 2020 2:45 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice

 

They are internal - use what you like if you are going to peek inside the API - I don't think it matters in this case but I would generally use the highest item in the hierarchy that serves my purposes. 

 

(BTW ICASTAmbiguousDeclarator does not exist, I assume you mean IASTAmbiguousDeclarator)

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com

 

 

On Tue, 25 Feb 2020 at 20:54, Ming Cheng <[hidden email]> wrote:

so the ans should be ICASTAmbiguousDeclarator interfaces?

 

From: [hidden email] <[hidden email]> on behalf of Jonah Graham <[hidden email]>
Sent: Tuesday, February 25, 2020 4:52 AM
To: CDT General developers list. <[hidden email]>
Subject: Re: [cdt-dev] Your advice

 

 

 

On Mon, 24 Feb 2020 at 23:39, Ming Cheng <[hidden email]> wrote:

 

Should I use class like CASTAmbiguousDeclarator or interface like ICASTAmbiguousDeclarator?

 

Generally you should avoid accessing the internal classes from outside of CDT. Not sure if you really need them here or not. 

 

Please submit a change to CDT containing your improvement to the visitor classes.

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

 


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Nathan Ridge
In reply to this post by Ming Cheng
> Question is that how to know a declaration is class/struct/function as detail as possible
> yet without using internal iface/class?

This requires a bit of knowledge about the C++ grammar.

* A class/struct definition will be a simple-declaration with a composite-type-specifier as its decl-specifier, and a declarator with an empty name. (If the declarator has a non-empty name, it's actually declaring a variable of a class/struct type being defined on the fly).

* A function definition has its own grammar production (not a simple-declaration) and node type (IASTFunctionDefinition).

* A function declaration will be a simple-declaration whose declarator is a function-declarator (IASTFunctionDeclarator).

* A simple-declaration where neither of the above cases apply usually declares a variable, but it could be something else too (e.g. a typedef). You could perform additional syntactic checks to discriminate (e.g. check for presence of typedef specifier), or resolve the name in the declarator and see what type of binding (e.g. IVariable vs. ITypedef) it resolves to.

Hope that helps,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng

Hi Nate,

 

You said something but I feel they are not relevant to “yet without using internal iface/class” directly.

 

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: Thursday, February 27, 2020 10:50 AM
To: [hidden email]; [hidden email]
Subject: Re: [cdt-dev] Your advice

 

> Question is that how to know a declaration is class/struct/function as detail as possible
> yet without using internal iface/class?

This requires a bit of knowledge about the C++ grammar.

* A class/struct definition will be a simple-declaration with a composite-type-specifier as its decl-specifier, and a declarator with an empty name. (If the declarator has a non-empty name, it's actually declaring a variable of a class/struct type being defined on the fly).

* A function definition has its own grammar production (not a simple-declaration) and node type (IASTFunctionDefinition).

* A function declaration will be a simple-declaration whose declarator is a function-declarator (IASTFunctionDeclarator).

* A simple-declaration where neither of the above cases apply usually declares a variable, but it could be something else too (e.g. a typedef). You could perform additional syntactic checks to discriminate (e.g. check for presence of typedef specifier), or resolve the name in the declarator and see what type of binding (e.g. IVariable vs. ITypedef) it resolves to.

Hope that helps,
Nate

 


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Nathan Ridge
> You said something but I feel they are not relevant to “yet without using internal iface/class” directly.

All of the mentioned interfaces for AST nodes (e.g. IASTSimpleDeclaration, IASTFunctionDefinition, etc.) and the methods for navigating the AST (e.g. IASTSimpleDeclaration.getDeclSpecifier()) are public APIs.

Regards,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Ming Cheng

This is my code:

 

class CheckCodeVisitor extends ASTVisitor {

 

@Override

    public int visit(IASTDeclaration decl) {

        IASTDeclarationImplClass.visit(index, decl);

        return PROCESS_CONTINUE;

    }

 

}

 

If we check IASTDeclaration document (https://help.eclipse.org/2019-12/index.jsp), we can see these information:

 

 

 

My concern is that if I can use IASTSimpleDeclaration to get all C++ code information, why we need ICPPASTExplicitTemplateInstantiation/ICPPASTxxxxxxx etc?

 

Again this is my IASTDeclarationImplClass code:

 

public class IASTDeclarationImplClass {

    private static final Logger log = LoggerFactory.getLogger(IASTDeclarationImplClass.class);

   

    public static int visit(IIndex index, IASTDeclaration decl) {

        if (decl instanceof CASTAmbiguousSimpleDeclaration) {

            CASTAmbiguousSimpleDeclaration simpleDeclaration = (CASTAmbiguousSimpleDeclaration) decl;

            return visit(index, simpleDeclaration);

        } else if (decl instanceof CASTASMDeclaration) {

            CASTASMDeclaration asmDeclaration = (CASTASMDeclaration) decl;

            return visit(index, asmDeclaration);

        } else if (decl instanceof CASTFunctionDefinition) {

            CASTFunctionDefinition funcDecl = (CASTFunctionDefinition) decl;

            return visit(index, funcDecl);

        } else if (decl instanceof CASTProblemDeclaration) {

            CASTProblemDeclaration problemDecl = (CASTProblemDeclaration) decl;

            return visit(index, problemDecl);

        } else if (decl instanceof CPPASTAmbiguousSimpleDeclaration) {

            CPPASTAmbiguousSimpleDeclaration cppSimpleDeclaration = (CPPASTAmbiguousSimpleDeclaration) decl;

            return visit(index, cppSimpleDeclaration);

        } else if (decl instanceof IASTSimpleDeclaration) {

            IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) decl;

            return visit(index, simpleDeclaration);

        } else if (decl instanceof CPPASTASMDeclaration) {

            CPPASTASMDeclaration cppASMDeclaration = (CPPASTASMDeclaration) decl;

            return visit(index, cppASMDeclaration);

        } else if (decl instanceof CPPASTExplicitTemplateInstantiation) {

            CPPASTExplicitTemplateInstantiation explicitTemplateInstantiation = (CPPASTExplicitTemplateInstantiation) decl;

            return visit(index, explicitTemplateInstantiation);

        } else if (decl instanceof CPPASTFunctionDefinition) {

            CPPASTFunctionDefinition cppFuncDefinition = (CPPASTFunctionDefinition) decl;

            return visit(index, cppFuncDefinition);

        } else if (decl instanceof CPPASTFunctionWithTryBlock) {

            CPPASTFunctionWithTryBlock cppFunctionWithTryBlock = (CPPASTFunctionWithTryBlock) decl;

            return visit(index, cppFunctionWithTryBlock);

        } else if (decl instanceof ICPPASTInternalTemplateDeclaration) {

            ICPPASTInternalTemplateDeclaration internalTempDecl = (ICPPASTInternalTemplateDeclaration) decl;

            return visit(index, internalTempDecl);

        } else if (decl instanceof CPPASTLinkageSpecification) {

            CPPASTLinkageSpecification linkageSpec = (CPPASTLinkageSpecification) decl;

            return visit(index, linkageSpec);

        } else if (decl instanceof CPPASTNamespaceAlias) {

            CPPASTNamespaceAlias nsAlias = (CPPASTNamespaceAlias) decl;

            return visit(index, nsAlias);

        } else if (decl instanceof CPPASTNamespaceDefinition) {

            CPPASTNamespaceDefinition nsDefn = (CPPASTNamespaceDefinition) decl;

            return visit(index, nsDefn);

        } else if (decl instanceof CPPASTProblemDeclaration) {

            CPPASTProblemDeclaration problemDeclaration = (CPPASTProblemDeclaration) decl;

            return visit(index, problemDeclaration);

        } else if (decl instanceof CPPASTSimpleDeclaration) {

            CPPASTSimpleDeclaration cppSimpleDeclaration = (CPPASTSimpleDeclaration) decl;

            return visit(index, cppSimpleDeclaration);

        } else if (decl instanceof CPPASTStaticAssertionDeclaration) {

            CPPASTStaticAssertionDeclaration staticAssertDecl = (CPPASTStaticAssertionDeclaration) decl;

            return visit(index, staticAssertDecl);

        } else if (decl instanceof CPPASTTemplateDeclaration) {

            CPPASTTemplateDeclaration cppTempDecl = (CPPASTTemplateDeclaration) decl;

            return visit(index, cppTempDecl);

        } else if (decl instanceof CPPASTTemplateSpecialization) {

            CPPASTTemplateSpecialization cppTempSpecialization = (CPPASTTemplateSpecialization) decl;

            return visit(index, cppTempSpecialization);

        } else if (decl instanceof CPPASTUsingDeclaration) {

            CPPASTUsingDeclaration cppUsingDecl = (CPPASTUsingDeclaration) decl;

            return visit(index, cppUsingDecl);

        } else if (decl instanceof CPPASTUsingDirective) {

            CPPASTUsingDirective cppUsingDirective = (CPPASTUsingDirective) decl;

            return visit(index, cppUsingDirective);

        } else if (decl instanceof CPPASTVisibilityLabel) {

            CPPASTVisibilityLabel cppVisibilityLabel = (CPPASTVisibilityLabel) decl;

            return visit(index, cppVisibilityLabel);

        } else if (decl instanceof GPPASTExplicitTemplateInstantiation) {

            GPPASTExplicitTemplateInstantiation cppExplicitTemplateInstantiation = (GPPASTExplicitTemplateInstantiation) decl;

            return visit(index, cppExplicitTemplateInstantiation);

        }

       

        return PROCESS_SKIP;

    }

 

 

   private static int visit(IIndex index, CASTAmbiguousSimpleDeclaration simpleDeclaration) {

        display("Visiting CASTAmbiguousSimpleDeclaration: " + simpleDeclaration.getRawSignature());

        return PROCESS_CONTINUE;

    }

}

 

According to yours and Jonah’s replies, it seems the following possible impl should be enough?

 

IASTASMDeclaration, IASTFunctionDefinition, IASTProblemDeclaration, IASTSimpleDeclaration

 

public class IASTDeclarationImplClass {

    private static final Logger log = LoggerFactory.getLogger(IASTDeclarationImplClass.class);

   

    public static int visit(IIndex index, IASTDeclaration decl) {

        if (decl instanceof IASTASMDeclaration) {

            IASTASMDeclaration asmDeclaration = (IASTASMDeclaration) decl;

            return visit(index, asmDeclaration);

        } else if (decl instanceof IASTFunctionDefinition) {

            IASTFunctionDefinition  funcDefn = (IASTFunctionDefinition) decl;

            return visit(index, funcDefn);

        } else if (decl instanceof IASTProblemDeclaration) {

            IASTProblemDeclaration problem = (IASTProblemDeclaration) decl;

            return visit(index, problem);

        }  else if (decl instanceof IASTSimpleDeclaration) {

            IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) decl;

            return visit(index, simpleDeclaration);

        }

        

        return PROCESS_SKIP;

    }

 

 

   private static int visit(IIndex index, IASTSimpleDeclaration simpleDeclaration) {

        display("Visiting IASTSimpleDeclaration: " + simpleDeclaration.getRawSignature());

        // use IASTSimpleDeclaration public API to get more detail information like whether it’s class or struct, or explicit template class instantiation etc?

        return PROCESS_CONTINUE;

    }

 

 

    ……

 

}

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: Friday, February 28, 2020 11:26 AM
To: [hidden email]; [hidden email]
Subject: Re: [cdt-dev] Your advice

 

> You said something but I feel they are not relevant to “yet without using internal iface/class” directly.

All of the mentioned interfaces for AST nodes (e.g. IASTSimpleDeclaration, IASTFunctionDefinition, etc.) and the methods for navigating the AST (e.g. IASTSimpleDeclaration.getDeclSpecifier()) are public APIs.

Regards,
Nate

 


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Your advice

Nathan Ridge
You should be able to use the public IAST* / ICAST* / ICPPAST* interfaces, as in your last code example, rather than the concrete CAST* / CPPAST* classes.

You are right that there are other kinds of declarations in C++ than classes/structs, variables, and functions. For comprehensive handling of all declaration types, you would want to handle all the derived classes of IASTDeclaration.

Hope that helps,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev