[Parrot-users] PCT - how to specify a namespace when compiling?

Will Coleda will at coleda.com
Tue Aug 17 20:06:10 UTC 2010


On Tue, Aug 17, 2010 at 3:55 PM, Stephen Weeks <tene at allalone.org> wrote:
> Not long ago, Will Coleda proclaimed...
>> I'm trying to implement [namespace eval] for partcl-nqp. When I was
>> compiling directly to PIR for partcl, I was able to just slip in a
>> ".namespace" directive, but I see no way to specify this using
>> PCT::HLLCompiler's  "compile" method.
>>
>> I don't see any mention of "namespace" in the squaak tutorial, or in
>> compilers/PCT/HLLCompiler.pir.
>>
>> Any pointers?
>
> You need to generate a PAST::Block with a :namespace attribute.  It's
> just like the :hll attribute.  I hope that helps.
>

So, I take this to mean that, rather than looking in .compile(), I
should be looking in my Actions.pm for my HLL. (in my case,
src/Partcl/Actions.pm)

But how do I pass in a parameters to subs in the Action when invoking
Partcl::Compiler.compile($code) ?




-- 
Will "Coke" Coleda


More information about the Parrot-users mailing list