]> git.donarmstrong.com Git - perltidy.git/commitdiff
remove unused code
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 6 Sep 2023 02:04:09 +0000 (19:04 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 6 Sep 2023 02:04:09 +0000 (19:04 -0700)
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/Tokenizer.pm

index 93dde3b01ede46bae6237ab868a9dc2d93848141..e1d5907d7d783665f0f411bd90e2f4aea4d72c6c 100644 (file)
@@ -8788,8 +8788,8 @@ sub respace_tokens_inner_loop {
                         $token =~ s/\(/ (/;
                     }
                     else {
-                        ## bad n value for -spp=n
-                        ## FIXME: this should be caught earlier
+                        # bad n value for -spp=n
+                        # just use the default
                     }
 
                     # one space max, and no tabs
index 012adca2dc1f86f325190a8f1a08e6d01778009c..a2c64c755e1908440f65a8157309007cbaba1b57 100644 (file)
@@ -3770,13 +3770,6 @@ EOM
         my $self = shift;
 
         # '<<' = maybe a here-doc?
-
-##      This check removed because it could be a deprecated here-doc with
-##      no specified target.  See example in log 16 Sep 2020.
-##            return
-##              unless ( $i < $max_token_index )
-##              ;          # here-doc not possible if end of line
-
         if ( $expecting != OPERATOR ) {
             my ( $found_target, $here_doc_target, $here_quote_character,
                 $saw_error );
@@ -3895,7 +3888,7 @@ EOM
 
             # Target not found, expecting==UNKNOWN
             else {
-                ## syntax error? FIXME: probably should write error msg
+                $self->warning("didn't find here doc target after '<<~'\n");
             }
         }
         else {
@@ -6392,14 +6385,6 @@ sub code_block_type {
         return $last_nonblank_token;
     }
 
-    # or a sub alias
-    # FIXME: see if this is really needed after the c250 update
-    elsif (( $last_nonblank_type eq 'i' || $last_nonblank_type eq 't' )
-        && ( $is_sub{$last_nonblank_token} ) )
-    {
-        return 'sub';
-    }
-
     elsif ( $statement_type =~ /^(sub|package)\b/ ) {
         return $statement_type;
     }
@@ -9908,11 +9893,6 @@ sub follow_quoted_string {
             }
             my $old_pos = $quote_pos;
 
-##          NOTE: OLD Code with did nothing - leftover from debugging?
-##          unless ( defined($tok) && defined($end_tok) && defined($quote_pos) )
-##          {
-
-##          }
             $quote_pos = 1 + index( $tok, $end_tok, $quote_pos );
 
             if ( $quote_pos > 0 ) {