NQP question to add a null value node

Moritz Lenz moritz at faui2k3.org
Fri Mar 4 14:29:14 UTC 2011



Am 04.03.2011 15:24, schrieb Gerd Pokorra:
> Am Freitag, den 04.03.2011, 15:03 +0100 schrieb Moritz Lenz:
>> Am 04.03.2011 14:15, schrieb Patrick R. Michaud:
>>> On Fri, Mar 04, 2011 at 01:11:43PM +0100, Gerd Pokorra wrote:
>>>> How can I add a node with the value null with NQP?
>>>> method value:sym<null>($/) {
>>>>      #  ????
>>>> }
>>>
>>> Perhaps...?
>>>
>>>       method value:sym<null>($/) {
>>>           pir::null();
>>
>> Should be:
>>
>> pir::null__p()
>>
>> Seems it doesn't know the signature of the 'null' opcode.
>>
>
> It gives no value back.
>
> Something like this:
>
>      method value:sym<null>($/) {
>          my $pir := 'dummy';
>          make PAST::Val.new( :value($pir), :node($/) );
>      }
>
> gives back the value 'dummy', but how to get the correct value in the
> $pir variable?


with pir::null__p() maybe?


More information about the parrot-dev mailing list