From 354366771188baab733dbf3d3612a9440151fa67 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 28 Aug 2022 18:52:07 -0700 Subject: [PATCH] removed unused coding --- lib/Perl/Tidy/Tokenizer.pm | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index f065cc69..e6e26158 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -4856,7 +4856,7 @@ EOM } # Remember last nonblank values - unless ( ( $type eq 'b' ) || ( $type eq '#' ) ) { + if ( $type ne 'b' && $type ne '#' ) { $last_last_nonblank_token = $last_nonblank_token; $last_last_nonblank_type = $last_nonblank_type; $last_last_nonblank_block_type = $last_nonblank_block_type; @@ -5011,7 +5011,6 @@ EOM my @tokens = (); # output tokens my @levels = (); # structural brace levels of output tokens my @ci_string = (); # string needed to compute continuation indentation - my $container_environment = EMPTY_STRING; # Count the number of '1's in the string (previously sub ones_count) my $ci_string_sum = ( my $str = $ci_string_in_tokenizer ) =~ tr/1/0/; @@ -5071,12 +5070,6 @@ EOM || $ternary_indentation_flag > 0 ) { - # use environment before updating - $container_environment = - $nesting_block_flag ? 'BLOCK' - : $nesting_list_flag ? 'LIST' - : EMPTY_STRING; - # if the difference between total nesting levels is not 1, # there are intervening non-structural nesting types between # this '{' and the previous unclosed '{' @@ -5280,11 +5273,6 @@ EOM } } ## end if ( length($nesting_block_string...)) - # use environment after updating - $container_environment = - $nesting_block_flag ? 'BLOCK' - : $nesting_list_flag ? 'LIST' - : EMPTY_STRING; $ci_string_i = $ci_string_sum + $in_statement_continuation; } ## end elsif ( $type_i eq '}' ||...{) @@ -5293,11 +5281,6 @@ EOM #----------------------------------------- else { - $container_environment = - $nesting_block_flag ? 'BLOCK' - : $nesting_list_flag ? 'LIST' - : EMPTY_STRING; - # zero the continuation indentation at certain tokens so # that they will be at the same level as its container. For # commas, this simplifies the -lp indentation logic, which @@ -5311,7 +5294,7 @@ EOM # be sure binary operators get continuation indentation if ( - $container_environment + ( $nesting_block_flag || $nesting_list_flag ) && ( $type_i eq 'k' && $is_binary_keyword{$tok_i} || $is_binary_type{$type_i} ) ) -- 2.39.5