From c9a77f10356b819351471b1795880d32e0fb6df3 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 2 Oct 2020 15:44:02 -0700 Subject: [PATCH] update comments --- lib/Perl/Tidy/Formatter.pm | 7 +++++-- lib/Perl/Tidy/VerticalAligner.pm | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 3bea7bb8..20c9825b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -3971,8 +3971,11 @@ sub finish_formatting { $self->scan_comments(); # Find nested pairs of container tokens for any welding. This information - # is also needed for adding semicolons when welding is done, so it is split - # apart from the welding step. + # is also needed for adding semicolons, so it is split apart from the + # welding step. But we need to do it even if we are not welding so that we + # do not introduce a semicolon in a place where it would prevent welding in + # the future. So this is necessary but a little inefficient if -wn is not + # used in this run. $self->find_nested_pairs(); # Make sure everything looks good diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index f0bb2080..3d0d8a59 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -50,7 +50,9 @@ use Perl::Tidy::VerticalAligner::Line; # CODE SECTION 10: Summary # sub report_anything_unusual +################################################################## # CODE SECTION 1: Preliminary code, global definitions and sub new +################################################################## sub AUTOLOAD { @@ -204,7 +206,9 @@ sub new { return $self; } +################################# # CODE SECTION 2: Basic Utilities +################################# sub flush { @@ -328,7 +332,9 @@ sub maximum_line_length_for_level { return $maximum_line_length; } +###################################################### # CODE SECTION 3: Code to accept input and form groups +###################################################### sub push_group_line { @@ -1410,7 +1416,9 @@ sub level_change { return $level; } +############################################### # CODE SECTION 4: Code to process comment lines +############################################### sub _flush_comment_lines { @@ -1474,7 +1482,9 @@ sub _flush_comment_lines { return; } +###################################################### # CODE SECTION 5: Code to process groups of code lines +###################################################### sub _flush_group_lines { @@ -3726,7 +3736,9 @@ sub adjust_side_comments { return; } +############################### # CODE SECTION 6: Output Step A +############################### sub valign_output_step_A { @@ -3875,7 +3887,9 @@ sub get_output_line_number { return $nlines + $file_writer_object->get_output_line_number(); } +############################### # CODE SECTION 7: Output Step B +############################### { ## closure for sub valign_output_step_B @@ -4267,7 +4281,9 @@ sub get_output_line_number { } } +############################### # CODE SECTION 8: Output Step C +############################### { ## closure for sub valign_output_step_C @@ -4389,7 +4405,9 @@ sub get_output_line_number { } } +############################### # CODE SECTION 9: Output Step D +############################### sub valign_output_step_D { @@ -4564,7 +4582,9 @@ sub valign_output_step_D { } } # end get_leading_string +########################## # CODE SECTION 10: Summary +########################## sub report_anything_unusual { my $self = shift; -- 2.39.5