Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlito5 - add standard tests for split() - failed 49/81
  • Loading branch information
fglock committed Oct 22, 2014
1 parent 2547cec commit 579f6b2
Show file tree
Hide file tree
Showing 3 changed files with 475 additions and 0 deletions.
2 changes: 2 additions & 0 deletions perlito5.pl
Expand Up @@ -10197,6 +10197,8 @@ package Perlito5::AST::Apply;
my $level = shift;
my $wantarray = shift;
my @js;
push(@{$self->{'arguments'}}, Perlito5::AST::Var->new('sigil' => '$', 'namespace' => '', 'name' => '_'))
if @{$self->{'arguments'}} < 2;
my $arg = $self->{'arguments'}->[0];
if ($arg && $arg->isa('Perlito5::AST::Apply') && $arg->{'code'} eq 'p5:m') {
push(@js, 'new RegExp(' . $arg->{'arguments'}->[0]->emit_javascript2() . ', ' . '"' . $arg->{'arguments'}->[1] . '"' . ')');
Expand Down
2 changes: 2 additions & 0 deletions src5/lib/Perlito5/Javascript2/Emitter.pm
Expand Up @@ -2576,6 +2576,8 @@ package Perlito5::AST::Apply;
my $level = shift;
my $wantarray = shift;
my @js;
push @{ $self->{arguments} }, Perlito5::AST::Var->new( sigil => '$', namespace => '', name => '_' )
if @{ $self->{arguments} } < 2;
my $arg = $self->{arguments}->[0];
if ( $arg
&& $arg->isa('Perlito5::AST::Apply')
Expand Down

0 comments on commit 579f6b2

Please sign in to comment.