[Bps-public-commit] r12600 - in pie/trunk/lib/PIE: Lambda
jesse at bestpractical.com
jesse at bestpractical.com
Wed May 21 07:06:57 EDT 2008
Author: jesse
Date: Wed May 21 07:06:55 2008
New Revision: 12600
Added:
pie/trunk/lib/PIE/FunctionArgument.pm
Modified:
pie/trunk/lib/PIE/Lambda/Native.pm
Log:
functionargument
Added: pie/trunk/lib/PIE/FunctionArgument.pm
==============================================================================
--- (empty file)
+++ pie/trunk/lib/PIE/FunctionArgument.pm Wed May 21 07:06:55 2008
@@ -0,0 +1,20 @@
+package PIE::FunctionArgument;
+use Moose;
+
+has name => (
+ is => 'rw',
+ isa => 'Str'
+);
+
+
+has type => (
+ is => 'rw',
+ isa => 'Str'# I want an enum of String, Number, Undef, PIE::Expression..what else?
+);
+
+has description => (
+ is => 'rw',
+ isa => 'Str | Undef',
+ required => 0);
+
+1;
Modified: pie/trunk/lib/PIE/Lambda/Native.pm
==============================================================================
--- pie/trunk/lib/PIE/Lambda/Native.pm (original)
+++ pie/trunk/lib/PIE/Lambda/Native.pm Wed May 21 07:06:55 2008
@@ -9,17 +9,17 @@
);
sub bind_expressions {
- my ($self, $ev, @exp) = @_;
+ my ($self, $evaluator, @exp) = @_;
return;
}
-sub evaluate {
+sub evaluatoraluate {
my $self = shift;
- my $ev = shift;
+ my $evaluator = shift;
my $bindings = $self->bindings;
Carp::croak "unmatched number of arguments" unless $#{$bindings} == $#_;
- $self->body->(map {$ev->run($_); $ev->result->value } @_);
+ $self->body->(map {$evaluator->run($_); $ev->result->value } @_);
}
1;
More information about the Bps-public-commit
mailing list