From: Steve Hancock Date: Wed, 17 Aug 2022 23:20:31 +0000 (-0700) Subject: update comments X-Git-Tag: 20220613.05~44 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=30bcb48d7d83a0c4419ddef1e041c3f4e8128a76;p=perltidy.git update comments --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index a384bc2d..befd406e 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -7939,8 +7939,8 @@ EOM # relinking lines and tokens after the tokens have been respaced. A fault # here indicates some kind of bug has been introduced into the above loops. # There is not good way to keep going; we better stop here. - # FIXME: This will produce zero output. it would be best to find a way to - # dump the input file. + # FIXME: Calling Fault will produce zero output. it would be best to find + # a way to dump the input file. if ( $Knext <= $Kmax ) { Fault("unexpected tokens at end of file when reconstructing lines"); @@ -20908,7 +20908,7 @@ EOM $i_effective_last_comma + 1 ) > 0; } - # FIXME: For an item after a '=>', try to include the length of the + # TODO: For an item after a '=>', try to include the length of the # thing before the '=>'. This is crude and should be improved by # actually looking back token by token. if ( !$too_long && $i_opening_paren > 0 && $list_type eq '=>' ) { @@ -21071,7 +21071,7 @@ sub study_list_complexity { && $i_last_last_break != $i - 2 ) { - ## FIXME: don't strand a small term + ## TODO: don't strand a small term pop @i_ragged_break_list; push @i_ragged_break_list, $i - 2; push @i_ragged_break_list, $i - 1; @@ -24147,24 +24147,6 @@ sub get_seqno { # entire file is processed with perltidy. next if ( $ipad == 0 && $peak_batch_size <= 1 ); -## THIS PATCH REMOVES THE FOLLOWING POOR PADDING (math.t) with -pbp, BUT -## IT DID MORE HARM THAN GOOD -## ceil( -## $font->{'loca'}->{'glyphs'}[$x]->read->{'xMin'} * 1000 -## / $upem -## ), -## # do not put leading padding for just 2 lines of math -## if ( $ipad == $ibeg -## && $line > 0 -## && $levels_to_go[$ipad] > $levels_to_go[ $ipad - 1 ] -## && $is_math_op{$type_next} -## && $line + 2 <= $max_line ) -## { -## my $ibeg_next_next = $ri_first->[ $line + 2 ]; -## my $type_next_next = $types_to_go[$ibeg_next_next]; -## next if !$is_math_op{$type_next_next}; -## } - # next line must not be at greater depth my $iend_next = $ri_last->[ $line + 1 ]; next diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index fc3dd237..7b9eb7c7 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -3790,7 +3790,7 @@ EOM # '-' => \&sse_sub, # '*' => \&sse_mul, # '/' => \&sse_div; - # FIXME: this should eventually be generalized + # TODO: this could eventually be generalized if ( $saw_use_module{$current_package}->{'RPerl'} && $tok =~ /^sse_(mul|div|add|sub)$/ ) { @@ -5747,9 +5747,9 @@ sub operator_expected { if ( $last_nonblank_type eq 'i' ) { $op_expected = OPERATOR; - # FIXME: it would be cleaner to make this a special type - # expecting VERSION or {} after package NAMESPACE - # TODO: maybe mark these words as type 'Y'? + # TODO: it would be cleaner to make this a special type + # expecting VERSION or {} after package NAMESPACE; + # maybe mark these words as type 'Y'? if ( substr( $last_nonblank_token, 0, 7 ) eq 'package' && $statement_type =~ /^package\b/ && $last_nonblank_token =~ /^package\b/ ) @@ -5877,8 +5877,8 @@ sub operator_expected { } # quote... - # FIXME: labeled prototype words should probably be given type 'A' or maybe - # 'J'; not 'q'; or maybe mark as type 'Y' + # TODO: labeled prototype words would better be given type 'A' or maybe + # 'J'; not 'q'; or maybe mark as type 'Y'? elsif ( $last_nonblank_type eq 'q' ) { $op_expected = OPERATOR; if ( $last_nonblank_token eq 'prototype' ) { @@ -7116,7 +7116,7 @@ sub scan_bare_identifier_do { # $tok='eval'; # patch to do braces like eval - doesn't work # $type = 'k'; #} - # FIXME: This could become a separate type to allow for different + # TODO: This could become a separate type to allow for different # future behavior: elsif ( $is_block_function{$package}{$sub_name} ) { $type = 'G';