From: Steve Hancock Date: Sat, 15 Oct 2022 15:18:18 +0000 (-0700) Subject: remove unused code; minor optimization X-Git-Tag: 20221112~44 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b498914f697aa426200b3e684132552556e547a0;p=perltidy.git remove unused code; minor optimization --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index cd93f0ce..6f2d774f 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -5219,6 +5219,13 @@ EOM $level_i = --$level_in_tokenizer; + if ( $level_in_tokenizer < 0 ) { + unless ( $self->[_saw_negative_indentation_] ) { + $self->[_saw_negative_indentation_] = 1; + warning("Starting negative indentation\n"); + } + } + # restore previous level values if ( length($nesting_block_string) > 1 ) { # true for valid script @@ -5301,10 +5308,6 @@ EOM ); ##if $routput_container_type->[$i] =~ /^[;,\{\}]$/; } - - elsif ( $tok_i eq ';' ) { - $in_statement_continuation = 0; - } } ## end if ( length($nesting_block_string...)) $ci_string_i = $ci_string_sum + $in_statement_continuation; @@ -5394,12 +5397,6 @@ EOM #------------------------------------------- # Section 4: operations common to all levels #------------------------------------------- - if ( $level_in_tokenizer < 0 ) { - unless ( $self->[_saw_negative_indentation_] ) { - $self->[_saw_negative_indentation_] = 1; - warning("Starting negative indentation\n"); - } - } # set secondary nesting levels based on all containment token # types Note: these are set so that the nesting depth is the