Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to Get The Scope of a Node

For IASTName nodes: name.resolveBinding().getScope().
There's also CPPVisitor.getContainingScope().
I'm not entirely sure what the difference is (because these methods aren't documented). I think the first one returns the scope that the name represents like if its a class name, and the second one returns the scope that contains the particular use of the name. Someone please correct me.

For AST nodes that represent lexical scopes, like IASTFunctionDefinition and IASTCompoundStatement just use getScope() on the node.


Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx

Inactive hide details for student08 ---05/15/2008 03:59:23 PM---Hi does anyone know how to get the scope for a particular node?student08 ---05/15/2008 03:59:23 PM---Hi does anyone know how to get the scope for a particular node?

          student08 <pingu219@xxxxxxxxx>
          Sent by: cdt-dev-bounces@xxxxxxxxxxx

          05/15/2008 03:52 PM

          Please respond to
          "CDT General developers list." <cdt-dev@xxxxxxxxxxx>

To

cdt-dev@xxxxxxxxxxx

cc


Subject

[cdt-dev] How to Get The Scope of a Node


Hi does anyone know how to get the scope for a particular node?
--
View this message in context:
http://www.nabble.com/How-to-Get-The-Scope-of-a-Node-tp17261038p17261038.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

GIF image

GIF image

GIF image


Back to the top