Changeset 21550
- Timestamp:
- 07/26/08 18:40:23 (6 months ago)
- Location:
- perl5/Pugs-Compiler-Perl6
- Files:
-
- 3 modified
-
MANIFEST (modified) (1 diff)
-
lib/Pugs/Emitter/Perl6/Perl5.pm (modified) (2 diffs)
-
lib/Pugs/Runtime/Perl6.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
perl5/Pugs-Compiler-Perl6/MANIFEST
r21456 r21550 160 160 t/spec/S16-io/say.t 161 161 t/spec/S29-any/cmp.t 162 t/spec/S29-array/delete.t 162 163 t/spec/S29-array/exists.t 163 164 t/spec/S29-context/exit-in-if.t -
perl5/Pugs-Compiler-Perl6/lib/Pugs/Emitter/Perl6/Perl5.pm
r21546 r21550 666 666 ) 667 667 { 668 if ( $n->{sub}{bareword} eq 'push' && $n->{op1} eq 'call' ) { 668 if ( ( $n->{sub}{bareword} eq 'push' 669 || $n->{sub}{bareword} eq 'pop' 670 ) 671 && $n->{op1} eq 'call' ) 672 { 669 673 if ( _is_paren_containing($n->{param}, \&_is_empty_exp) ) { 670 return _not_implemented( "pushwithout parameters", "call" );674 return _not_implemented( $n->{sub}{bareword} . " without parameters", "call" ); 671 675 } 672 676 if ( _is_paren_containing($n->{param}, \&_is_exp_containing, \&_is_empty_braces ) ) { … … 944 948 return 'Pugs::Runtime::Perl6::Array::map([\('.$code.', '. _emit( $n->{self} ).')], {})'; 945 949 } 946 if ( $n->{method}{dot_bareword} eq 'delete' 947 || $n->{method}{dot_bareword} eq 'exists' 948 ) { 950 if ( $n->{method}{dot_bareword} eq 'delete' ) { 951 my $self = _emit($n->{self}); 952 return '( bless [' 953 . _emit( $n->{method} ).' '.$self.'['._emit($n->{param}).']' 954 . "], 'Pugs::Runtime::Perl6::Array' )"; 955 } 956 if ( $n->{method}{dot_bareword} eq 'exists' ) { 949 957 my $self = _emit($n->{self}); 950 958 $self =~ s{\@}{\$}; -
perl5/Pugs-Compiler-Perl6/lib/Pugs/Runtime/Perl6.pm
r21546 r21550 355 355 356 356 package Pugs::Runtime::Perl6::Array; 357 use overload ( 358 '""' => \&str, 359 '0+' => sub { scalar @{$_[0]} }, 360 'bool' => sub { scalar @{$_[0]} ? 1 : 0 }, 361 fallback => 1, 362 ); 363 sub str { 364 join( " ", @{$_[0]} ) 365 } 357 366 358 367 sub map {
