]> git.donarmstrong.com Git - perltidy.git/commitdiff
update comments
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Oct 2020 22:44:02 +0000 (15:44 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Oct 2020 22:44:02 +0000 (15:44 -0700)
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/VerticalAligner.pm

index 3bea7bb8812bd572938535349fccc9f68a21d8b5..20c9825b84b4f48c9d74ac3c26fdf7e3daa76a45 100644 (file)
@@ -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
index f0bb2080bf65aad96b8356bcefcb9712276ea370..3d0d8a599110900abba9609546cd1574b6af44aa 100644 (file)
@@ -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;