Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge latest.
  • Loading branch information
jnthn committed Jul 27, 2009
2 parents 3bba1f0 + 4c31fb7 commit 82b59c4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Test.pm
Expand Up @@ -63,6 +63,14 @@ multi sub nok(Object $cond) is export(:DEFAULT) { nok($cond, ''); }
multi sub is(Object $got, Object $expected, $desc) is export(:DEFAULT) {
my $test = $got eq $expected;
proclaim(?$test, $desc);
if !$test {
my $got_perl = try { $got.perl };
my $expected_perl = try { $expected.perl };
if $got_perl.defined && $expected_perl.defined {
diag " got: $got_perl";
diag "expected: $expected_perl";
}
}
}

multi sub is(Object $got, Object $expected) is export(:DEFAULT) { is($got, $expected, ''); }
Expand Down
2 changes: 1 addition & 1 deletion build/PARROT_REVISION
@@ -1 +1 @@
40255
40282
1 change: 1 addition & 0 deletions docs/spectest-progress.csv
Expand Up @@ -427,3 +427,4 @@
"2009-07-21 00:00",b756ac9,11854,0,473,2245,14572,17455,416
"2009-07-22 00:00",21066f1,11343,651,473,2101,14568,17453,416
"2009-07-23 00:00",6062092,11876,0,461,2238,14575,17460,416
"2009-07-24 00:00",fc60e1d,11913,0,462,2236,14611,17496,418
2 changes: 2 additions & 0 deletions src/parser/grammar-oper.pg
Expand Up @@ -179,6 +179,8 @@ proto prefix:<[,]> is precedence('e=') is subname('list') {...}
proto prefix:<[&]> is equiv(prefix:<[,]>) is subname('all') {...}
proto prefix:<[|]> is equiv(prefix:<[,]>) is subname('any') {...}
proto prefix:<[^]> is equiv(prefix:<[,]>) is subname('one') {...}
proto prefix:<[||]> is equiv(prefix:<[,]>) {...}
proto prefix:<[//]> is equiv(prefix:<[,]>) {...}

## loose and
proto infix:<and> is precedence('d=')
Expand Down
16 changes: 16 additions & 0 deletions src/setting/Operators.pm
Expand Up @@ -62,4 +62,20 @@ multi sub infix:<leg>($a, $b) {
~$a cmp ~$b;
}

sub prefix:<[//]>(*@a) {
for @a -> $item {
$item // next;
return $item;
}
return ();
}

sub prefix:<[||]>(*@a) {
for @a -> $item {
$item || next;
return $item;
}
return ();
}

# vim: ft=perl6
2 changes: 1 addition & 1 deletion t/spectest.data
Expand Up @@ -89,10 +89,10 @@ S02-magicals/env.t
S02-magicals/progname.t
S02-names_and_variables/fmt.t
S02-names_and_variables/names.t
S02-names_and_variables/our.t
S02-names_and_variables/perl.t
S02-names_and_variables/varnames.t
S02-names/identifier.t
S02-names/our.t
S02-one-pass-parsing/less-than.t
S02-polymorphic_types/subset.t
S02-whitespace_and_comments/begin_end_pod.t
Expand Down

0 comments on commit 82b59c4

Please sign in to comment.