On 23 Nov 2014, at 17:37, Serge Stinckwich
<serge.stinckwich(a)gmail.com> wrote:
On Sun, Nov 23, 2014 at 10:13 AM, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>
>> On 22 Nov 2014, at 18:17, Serge Stinckwich <serge.stinckwich(a)gmail.com>
wrote:
>>
>> I'm trying to port QuasiQuote package from Lukas Renggli to Pharo 3.0/4.0.
>> This package use the RBCompiler class from the AST-Compiler package
>> available here:
>>
http://source.lukas-renggli.ch/helvetia
>>
>> If I understand RBCompiler, this is a Compiler that use RB parser nodes.
>> I guess this is something that is no more relevant with the new Opal compiler ?
>>
>
> Yes, this is the PetitParser based Smalltalk parser that created RB ParseNodes.
>
> Opal has a pluggable architecture for the parser, right now it just uses the
hand-written
> RB Parser that came with the refactoring browser.
Ok, thank you for the explanation, Markus.
I'm able to parse Smalltalk code containing QuasiQuote and generate an
RB parsenodes AST.
How I can plug my AST tree to generate IR and bytecodes ?
You can just as it to generate a CompileMethod with #compiledMethod
(if you access e.g. ivars and the method was not compiled for a specific
class yet, you might need to #doSemanticAnalysisIn: before)
Marcus