This reverts commit
6a31dbf44ee919c340a3372c95b28d581979d165.
It turns out to be wrong. Loopexes do have low precedence, but not
as low as I thought. Their precedence level is actually their own,
undocumented in perlop:
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 3edeabd..c9a1adf 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -49,6 +49,7 @@ values only, not array values.
nonassoc .. ...
right ?:
right = += -= *= etc.
+ nonassoc loop exits (last, next, goto)
left , =>
nonassoc list operators (rightward)
right not
I am reverting this for now, till we decide what it is that
needs fixing.
} elsif (class($op) eq "OP") {
# no-op
} elsif (class($op) eq "UNOP") {
- (my $kid = $self->deparse($op->first, 5)) =~ s/^\cS//;
+ (my $kid = $self->deparse($op->first, 16)) =~ s/^\cS//;
$name .= " $kid";
}
- return $self->maybe_parens($name, $cx, 5);
+ return $self->maybe_parens($name, $cx, 16);
}
sub pp_last { loopex(@_, "last") }
$deparse->coderef2text(
eval "no strict 'vars'; sub { () = $expr }" or die "$@in $expr"
),
- qr/\bCORE::$keyword.*[);]/,
+ qr/\sCORE::$keyword.*;/,
$name||$keyword
}
() = warn() + 1;
() = setpgrp() + 1;
####
-# loopexes have list prec
-() = (CORE::dump a) | 'b';
-() = (goto a) | 'b';
-() = (last a) | 'b';
-() = (next a) | 'b';
-() = (redo a) | 'b';
-####
# [perl #63558] open local(*FH)
open local *FH;
pipe local *FH, local *FH;