[Bps-public-commit] r12679 - pie/branches/named-params/lib/PIE

clkao at bestpractical.com clkao at bestpractical.com
Sun May 25 04:11:35 EDT 2008


Author: clkao
Date: Sun May 25 04:11:34 2008
New Revision: 12679

Added:
   pie/branches/named-params/lib/PIE/Block.pm
Modified:
   pie/branches/named-params/lib/PIE/Expression.pm
   pie/branches/named-params/lib/PIE/Lambda.pm

Log:
block id and outter block pointer.


Added: pie/branches/named-params/lib/PIE/Block.pm
==============================================================================
--- (empty file)
+++ pie/branches/named-params/lib/PIE/Block.pm	Sun May 25 04:11:34 2008
@@ -0,0 +1,16 @@
+package PIE::Block;
+use Moose::Role;
+
+our $BLOCK_IDS = 0;
+
+has block_id => (
+                 is => 'ro',
+                 isa => 'Num',
+                 default => sub { ++$BLOCK_IDS },
+);
+
+has outter_scope => (
+                     is => 'ro',
+                     isa => 'Num',
+                     default => sub { 0 },
+);

Modified: pie/branches/named-params/lib/PIE/Expression.pm
==============================================================================
--- pie/branches/named-params/lib/PIE/Expression.pm	(original)
+++ pie/branches/named-params/lib/PIE/Expression.pm	Sun May 25 04:11:34 2008
@@ -169,6 +169,7 @@
 package PIE::Expression::Let;
 use Moose;
 extends 'PIE::Expression::ProgN';
+with 'PIE::Block';
 
 has bindings => (
     is => 'rw',

Modified: pie/branches/named-params/lib/PIE/Lambda.pm
==============================================================================
--- pie/branches/named-params/lib/PIE/Lambda.pm	(original)
+++ pie/branches/named-params/lib/PIE/Lambda.pm	Sun May 25 04:11:34 2008
@@ -2,6 +2,8 @@
 package PIE::Lambda;
 use Moose; use MooseX::Params::Validate;
 
+with 'PIE::Block';
+
 has progn => (
     is => 'ro',
     isa => 'PIE::Expression::ProgN',
@@ -54,7 +56,6 @@
 sub apply {
     my ($self, $evaluator, $args) = @_;
 
-
     $self->validate_args_or_die($args);
 
     $evaluator->enter_stack_frame( args => $args);



More information about the Bps-public-commit mailing list