but lukas why we cannot simply know if a variable is named super and self. Because normally it should be accepted as something by the compiler or we should fix the compiler.
On May 29, 2010, at 7:49 PM, Lukas Renggli wrote:
#isSuper is not related to AST-Semantics. As far as I know from Veronica this was an extension method merely comparing the name of the variable with the string 'super'.
AST-Semantics is an attempt in providing correct scope and variable binding information (so that it can also be used by a compiler for example, or Helvetia in my case). In fact it can tell you if two variables refer to the same object or just happen to have the same name. Also it can tell you the scope in which the variable is visible and all its readers and writers.
Providing all that information comes at a small price, it is slightly more complicated to use and requires a few extra steps. If you want to annotate an AST with semantic information you have to tell it in what scope (e.g. the class) is used (I guess that should be simplified):
RBSemanticAnnotator new start: aTree class: aClass
From then on all variables have a #variableBinding object that
uniquely identifies variables that refer to the same thing. You can then ask a variable if it is a super call, and more ...
aVariableNode variableBinding isSuperBinding
Lukas
On 29 May 2010 19:28, Tudor Girba tudor.girba@gmail.com wrote:
Hi,
I am looking into AST-Semantic. I found the one from the http://www.squeaksource.com/rb.
However, this one does not have the methods:
- RBProgramNode>>isSuper
- RBVariableNode>>isSuper
These are needed for the SmalltalkImporter.
Am I looking at the wrong repository, or are these methods just missing?
Cheers, Doru
-- www.tudorgirba.com
"When people care, great things can happen."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev