return;
} ## end sub do_VERTICAL_LINE
+ # An identifier in possible indirect object location followed by any of
+ # these tokens: -> , ; } (plus others) is not an indirect object. Fix c257.
+ my %Z_test_hash;
+
+ BEGIN {
+ my @q = qw#
+ -> ; } ) ]
+ => =~ = == !~ || >= != *= .. && |= .= -= += <= %=
+ ^= &&= ||= //= <=>
+ #;
+ push @q, ',';
+ @{Z_test_hash}{@q} = (1) x scalar(@q);
+ }
+
sub do_DOLLAR_SIGN {
my $self = shift;
{
# An identifier followed by '->' is not indirect object;
- # fixes b1175, b1176
- my ( $next_nonblank_type, $i_next ) =
- $self->find_next_noncomment_type( $i, $rtokens,
+ # fixes b1175, b1176. Fix c257: Likewise for other tokens like
+ # comma, semicolon, closing brace, ...
+ my ( $next_nonblank_token, $i_next ) =
+ $self->find_next_noncomment_token( $i, $rtokens,
$max_token_index );
- $type = 'Z' if ( $next_nonblank_type ne '->' );
+ $type = 'Z' if ( !$Z_test_hash{$next_nonblank_token} );
}
return;
} ## end sub do_DOLLAR_SIGN
return ( $next_nonblank_token, $i );
} ## end sub find_next_nonblank_token
-sub find_next_noncomment_type {
+sub find_next_noncomment_token {
my ( $self, $i, $rtokens, $max_token_index ) = @_;
# Given the current character position, look ahead past any comments
}
return ( $next_nonblank_token, $i_next );
-} ## end sub find_next_noncomment_type
+} ## end sub find_next_noncomment_token
sub is_possible_numerator {
../snippets28.t xbt.xbt1
../snippets28.t xbt.xbt2
../snippets28.t xbt.xbt3
+../snippets28.t lrt.def
+../snippets28.t lrt.lrt
../snippets3.t ce_wn1.ce_wn
../snippets3.t ce_wn1.def
../snippets3.t colin.colin
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets28.t lrt.def
-../snippets28.t lrt.lrt
# with -kgb, do no break after last my
sub next_sibling {
my $self = shift;
- my $parent = $_PARENT{ refaddr $self} or return '';
+ my $parent = $_PARENT{ refaddr $self } or return '';
my $key = refaddr $self;
my $elements = $parent->{children};
my $position = List::MoreUtils::firstidx {
sub next_sibling {
my $self = shift;
- my $parent = $_PARENT{ refaddr $self} or return '';
+ my $parent = $_PARENT{ refaddr $self } or return '';
my $key = refaddr $self;
my $elements = $parent->{children};
my $position = List::MoreUtils::firstidx {