Thank you Markus and Thierry, I will try that.




On Thu, Jan 9, 2014 at 5:10 AM, Goubier Thierry <thierry.goubier@cea.fr> wrote:


Le 09/01/2014 01:57, Nicolas Passerini a �crit :

I am looking at the AST of a method like this:

someMethod
^ SomeClass new


It was a surprise to me that the note for 'SomeClass' is an
RBVariableNode instead of a RBClassReference. Which is the best way to
tell if an RBVariableNode represents a global reference or an instance
variable?

You test the binding associated with the RBVariableNode

self binding isInstance -> instance variable name

self binding isLiteral or: [ self isGlobal]
� � � � Class reference or a global reference (singleton) or a literal

self binding isTemp -> temporary

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Syst�mes Temps R�el Embarqu�s
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95