texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[8228] remove commented-out statements


From: gavinsmith0123
Subject: [8228] remove commented-out statements
Date: Mon, 24 Sep 2018 07:10:02 -0400 (EDT)

Revision: 8228
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8228
Author:   gavin
Date:     2018-09-24 07:10:02 -0400 (Mon, 24 Sep 2018)
Log Message:
-----------
remove commented-out statements

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2018-09-24 10:58:59 UTC (rev 8227)
+++ trunk/ChangeLog     2018-09-24 11:10:02 UTC (rev 8228)
@@ -1,5 +1,14 @@
 2018-09-24  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_parse_texi): Remove a comment.
+       (_merge_text, _abort_empty_line, _parse_texi_regex): Add a 
+       comment noting these subs have XS overrides.
+       (_gather_def_item, _close_commands, _end_line, _parse_texi)
+       (_gather_previous_item): Remove commented-out debugging 
+       statements.
+
+2018-09-24  Gavin Smith  <address@hidden>
+
        * tp/tests/run_parser_all.sh: Delete 'staging_res' directories 
        once finished.
 

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2018-09-24 10:58:59 UTC (rev 8227)
+++ trunk/tp/Texinfo/Parser.pm  2018-09-24 11:10:02 UTC (rev 8228)
@@ -1410,7 +1410,6 @@
     }
     return;
   }
-  #print STDERR "GATHER "._print_current($current)."\n";
   my $type;
   # if before an itemx, the type is different since there should not be 
   # real content, so it may be treated differently
@@ -1425,7 +1424,6 @@
   # put it in the table_item, starting from the end.
   my $contents_count = scalar(@{$current->{'contents'}});
   for (my $i = 0; $i < $contents_count; $i++) {
-    #print STDERR "_gather_previous_item $i on $contents_count: 
"._print_current($current->{'contents'}->[-1])."\n";
     if ($current->{'contents'}->[-1]->{'cmdname'} 
         and ($current->{'contents'}->[-1]->{'cmdname'} eq 'item' 
              or ($current->{'contents'}->[-1]->{'cmdname'} eq 'itemx'))) {
@@ -1500,7 +1498,6 @@
   # @deffnx a b @section
   # but otherwise the end of line will lead to the command closing
   return if (!$current->{'cmdname'} or $current->{'cmdname'} =~ /x$/);
-  #print STDERR "_gather_def_item($type) in "._print_current($current)."\n";
   my $def_item = {'type' => $type,
                   'parent' => $current,
                   'contents' => []};
@@ -1508,7 +1505,6 @@
   # starting from the end.
   my $contents_count = scalar(@{$current->{'contents'}});
   for (my $i = 0; $i < $contents_count; $i++) {
-    #print STDERR "_gather_def_item $type ($i on $contents_count) 
"._print_current($current->{'contents'}->[-1])."\n";
     if ($current->{'contents'}->[-1]->{'type'} 
         and $current->{'contents'}->[-1]->{'type'} eq 'def_line') {
      #   and !$current->{'contents'}->[-1]->{'extra'}->{'not_after_command'}) {
@@ -1794,8 +1790,6 @@
                             $line_nr, $current);
       }
     }
-    #print STDERR "close context $context for $current->{'cmdname'}\n"
-    #  if ($self->{'DEBUG'});
     pop @{$self->{'regions_stack'}} 
        if ($region_commands{$current->{'cmdname'}});
     $closed_element = $current;
@@ -1810,6 +1804,7 @@
 
 # begin paragraph if needed.  If not try to merge with the previous
 # content if it is also some text.
+# NOTE - this sub has an XS override
 sub _merge_text {
   my ($self, $current, $text) = @_;
 
@@ -2110,6 +2105,7 @@
 # each time a new line appeared, a container is opened to hold the text
 # consisting only of spaces.  This container is removed here, typically
 # this is called when non-space happens on a line.
+# NOTE - this sub has an XS override
 sub _abort_empty_line {
   my ($self, $current, $additional_spaces) = @_;
 
@@ -2925,7 +2921,6 @@
                and ($arg->{'cmdname'} eq 'c' 
                      or $arg->{'cmdname'} eq 'comment'))
                or (defined($arg->{'text'}) and $arg->{'text'} !~ /\S/))) {
-            #print STDERR " -> stop at "._print_current($arg)."\n";
             delete $current->{'extra'}->{'command_as_argument'}->{'type'};
             delete $current->{'extra'}->{'command_as_argument'};
             last;
@@ -3520,6 +3515,7 @@
 
 # This combines several regular expressions used in '_parse_texi' to
 # look at what is next on the remaining part of the line.
+# NOTE - this sub has an XS override
 sub _parse_texi_regex {
   my ($line) = @_;
 
@@ -3543,33 +3539,6 @@
     $separator_match, $misc_text);
 }
 
-# the different types
-#c 'menu_entry'
-#c 'menu_entry'
-# t 'menu_entry_leading_text'
-#
-#t 'macro_arg_name'
-#t 'macro_arg_args'
-#
-#t 'raw'
-#
-#t 'misc_arg'
-#c 'misc_line_arg'
-#
-#c 'block_line_arg'
-#
-#c 'brace_command_arg'
-#c 'brace_command_context'
-#
-#c 'before_item'   what comes after @*table, @itemize, @enumerate before
-#                an @item
-#
-#c 'paragraph'
-#
-#a 'def_line'
-#
-#special for @verb, type is the character
-
 # the main subroutine
 sub _parse_texi($;$)
 {
@@ -4014,7 +3983,6 @@
               }
             }
             $current = $menu;
-            #print STDERR "Close MENU_COMMENT because new menu entry\n";
           } else {
             # first parent preformatted, third is menu_entry
             if ($current->{'type'} ne 'preformatted' 
@@ -5375,9 +5343,8 @@
         $current = _merge_text($self, $current, $new_text);
       # end of line
       } else {
-        if ($self->{'DEBUG'}) {
-          print STDERR "END LINE: ". _print_current($current)."\n";
-        }
+        print STDERR "END LINE: ". _print_current($current)."\n"
+          if ($self->{'DEBUG'});
         if ($line =~ s/^(\n)//) {
           $current = _merge_text($self, $current, $1);
         } else {
@@ -5387,7 +5354,6 @@
             die;
           }
         }
-        #print STDERR "END LINE AFTER MERGE END OF LINE: ". 
_print_current($current)."\n";
         $current = _end_line($self, $current, $line_nr);
         last;
       }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]