my $Kend_code =
$batch_CODE_type && $batch_CODE_type ne 'VER' ? undef : $Kend;
- # We need two slightly different definitions of level jump:
- # $level_jump is the 'slevel' jump across line starts for valign
# $ljump is a level jump needed by 'sub set_adjusted_indentation'
- my $level_jump = 0;
my $ljump = 0;
# Get some vars on line [n+1], if any:
$token_beg_next = $rLL->[$Kbeg_next]->[_TOKEN_];
$type_end_next = $rLL->[$Kend_next]->[_TYPE_];
$ljump = $rLL->[$Kbeg_next]->[_LEVEL_] - $rLL->[$Kend]->[_LEVEL_];
- $level_jump =
- $rLL->[$Kbeg_next]->[_SLEVEL_] - $rLL->[$Kbeg]->[_SLEVEL_];
}
else {
if ( defined($Kbeg_next) ) {
$ljump =
$rLL->[$Kbeg_next]->[_LEVEL_] - $rLL->[$Kend]->[_LEVEL_];
- $level_jump =
- $rLL->[$Kbeg_next]->[_SLEVEL_] - $rLL->[$Kbeg]->[_SLEVEL_];
}
}
$rvalign_hash->{outdent_long_lines} = $outdent_long_lines;
$rvalign_hash->{is_terminal_ternary} = $is_terminal_ternary;
$rvalign_hash->{rvertical_tightness_flags} = $rvertical_tightness_flags;
- $rvalign_hash->{level_jump} = $level_jump;
$rvalign_hash->{rfields} = $rfields;
$rvalign_hash->{rpatterns} = $rpatterns;
$rvalign_hash->{rtokens} = $rtokens;
my $outdent_long_lines = $rline_hash->{outdent_long_lines};
my $is_terminal_ternary = $rline_hash->{is_terminal_ternary};
my $rvertical_tightness_flags = $rline_hash->{rvertical_tightness_flags};
- my $level_jump = $rline_hash->{level_jump};
my $rfields = $rline_hash->{rfields};
my $rtokens = $rline_hash->{rtokens};
my $rpatterns = $rline_hash->{rpatterns};
# The index '$Kend' is a value which passed along with the line text to sub
# 'write_code_line' for a convergence check.
- # NOTE: the coding has been revised to avoid use of '$level_jump'.
- # Eventually it can be eliminated as a call parameter.
-
# number of fields is $jmax
# number of tokens between fields is $jmax-1
my $jmax = @{$rfields} - 1;
if ( $cached_line_type == 3
&& !$self->group_line_count()
&& $cached_line_flag < 2
- && !$is_balanced_line ) ##&& $level_jump != 0 )
+ && !$is_balanced_line )
{
set_cached_line_valid(0);
}
# alignment of the '{'.
if ( $rfields->[0] eq 'else '
&& @{$rgroup_lines}
- && $is_balanced_line ) ##&& $level_jump == 0 )
+ && $is_balanced_line )
{
$j_terminal_match =
$self->_flush_group_lines(-1);
}
- ## OLD CODING:
- ## Force break after jump to lower level
- ## if ( $level_jump < 0 ) {
- ## $self->_flush_group_lines($level_jump);
- ## }
-
# --------------------------------------------------------------------
# Some old debugging stuff
# --------------------------------------------------------------------
# $level_jump = $next_level-$group_level, if known
# = undef if not known
+ # Note: only the sign of the jump is needed
my $rgroup_lines = $self->[_rgroup_lines_];
return unless ( @{$rgroup_lines} );