On Wed, Feb 27, 2013 at 6:26 AM, Fabrizio Perin <fabrizio.perin(a)gmail.com>wrote;wrote:
- The visiting of method ASTs happens in the
SmalltalkMethodVisitor
which is triggered by
SmalltalkImporter>>createMethod:. It is this visitor
which is the responsible for triggering the creation of low-level objects
like invocations and accesses.
Yes.
The SmalltalkImporter>>createMethod: need as parameter acompiledMethod
which is evidently a MethodNode since RBMethodNode do not implement the
methodClass which is invoked in createMethod:
So, am I missing something? Should I use another parser other than
PPSmalltalkParser?
I think SmalltalkImporter is coded to pull the code directly out of
Pharo/Moose -
that is, Smalltalk code already in the image, so it uses
MethodNode. Since you are not actually loading it into Moose in a runable
format, but instead parsing it, you don't have MethodNode.
I think you should extend RBMethodNode with the methods that are needed to
satisfy SmalltalkImporter - this will make future handling of other
Smalltalk sources much nicer.
-Chris