Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Allison (3003)

  (email not shown publicly)

Human (I think).

Journal of Allison (3003)

Tuesday January 02, 2007
01:51 AM

Punie tests all pass again

[ #32044 ]

I converted Punie over to using PAST-pm's way of representing conditionals. I tried out altering Punie's parsing of conditionals to match Perl 6's, but it turns out parsing else/elsif blocks recursively results in simpler parse->past transformation rules than the iterative way Perl6 is parsing them. So, I kept Punie's existing parse rules.

I had to set the 'pasttype' attribute in the PAST::Op node for '=' to 'assign' rather than setting the 'pirop' attribute to 'assign'. This stops the PIR generator from trying to assign 3 values to a string. It's an oddish work-around, possibly a bug in the past->post transformation, I'll come back and look at it later.

I had to set Punie variables to vivify as undef, by setting the 'viviself' attribute on PAST::Var nodes to '.Undef'.

I changed all the builtin operator names to have 'infix:' on the front. This is the Perl 6 way of naming operators, and I haven't decided if I want to keep it. I'll come back to it later.

And finally, I had to set '&&' operators to a 'pasttype' of 'if', and '||' operators to a 'pasttype' of 'unless'.

With those changes, all Punie test pass, so I'm checking it in. The next step is some refactoring and cleanup.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.