]> git.donarmstrong.com Git - perltidy.git/commitdiff
remove unused code; minor optimization
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 15 Oct 2022 15:18:18 +0000 (08:18 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 15 Oct 2022 15:18:18 +0000 (08:18 -0700)
lib/Perl/Tidy/Tokenizer.pm

index cd93f0ce8edd2e52c1ff5d26d37af55cc1585ea2..6f2d774f2d57df623c9eb5ba6277a17027e456ce 100644 (file)
@@ -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