texinfo-commits
[Top][All Lists]
Advanced

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

[7926] exchange two conditional blocks for DUMP_TREE


From: gavinsmith0123
Subject: [7926] exchange two conditional blocks for DUMP_TREE
Date: Mon, 31 Jul 2017 17:38:56 -0400 (EDT)

Revision: 7926
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7926
Author:   gavin
Date:     2017-07-31 17:38:56 -0400 (Mon, 31 Jul 2017)
Log Message:
-----------
exchange two conditional blocks for DUMP_TREE

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/texi2any.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-07-31 21:21:02 UTC (rev 7925)
+++ trunk/ChangeLog     2017-07-31 21:38:56 UTC (rev 7926)
@@ -1,5 +1,21 @@
+2017-07-31  Gavin Smith  <address@hidden>
+
+       * tp/texi2any.pl <DUMP_TREE>: Check if tree is defined, as 
+       happened before.
+
 2017-07-31  Randall Sawyer  <address@hidden>  (tiny change)
 
+       * tp/texi2any.pl: Exchange two conditional blocks, so that we 
+       check if 'DUMP_TREE' was given as an option before 'parse' being 
+       the output format, so that
+
+         makeinfo -c DUMP_TREE=1 -c TEXINFO_OUTPUT_FORMAT=parse document.texi
+
+       works to dump the parse tree, as mentioned in the comments at 
+       the end of Parser.pm.
+
+2017-07-31  Randall Sawyer  <address@hidden>  (tiny change)
+
        * tp/texi2any.pl (%formats_table)
        <textcontent, rawtext, plaintexinfo>: Change to use 'module' 
        value instead of a 'converter' value so that these values for 

Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl        2017-07-31 21:21:02 UTC (rev 7925)
+++ trunk/tp/texi2any.pl        2017-07-31 21:38:56 UTC (rev 7926)
@@ -1228,13 +1228,9 @@
   #my $global_commands = $parser->global_commands_information();
   #print STDERR join('|', keys(%$global_commands))."\n";
 
-  if (!defined($tree) or $format eq 'parse') {
-    handle_errors($parser, $error_count, address@hidden);
-    next;
-  }
-
-  if (defined(get_conf('DUMP_TREE')) 
-      or (get_conf('DEBUG') and get_conf('DEBUG') >= 10)) {
+  if (defined($tree)
+      and (defined(get_conf('DUMP_TREE')) 
+           or (get_conf('DEBUG') and get_conf('DEBUG') >= 10))) {
     # this is very wrong, but a way to avoid a spurious warning.
     no warnings 'once';
     local $Data::Dumper::Purity = 1;
@@ -1242,7 +1238,12 @@
     local $Data::Dumper::Indent = 1;
     print STDERR Data::Dumper->Dump([$tree]);
   }
+  if (!defined($tree) or $format eq 'parse') {
+    handle_errors($parser, $error_count, address@hidden);
+    next;
+  }
 
+
   if ($tree_transformations{'fill_gaps_in_sectioning'}) {
     my ($filled_contents, $added_sections) 
       = Texinfo::Transformations::fill_gaps_in_sectioning($tree);




reply via email to

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