texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (%parser_state_initia


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (%parser_state_initialization), (_process_remaining_on_line, _end_line_misc_line, _parse_texi): rename conditionals_stack as conditional_stack to match XS parser.
Date: Sun, 01 Jan 2023 11:11:43 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 7d64cf13d2 * tp/Texinfo/ParserNonXS.pm (%parser_state_initialization), 
(_process_remaining_on_line, _end_line_misc_line, _parse_texi): rename 
conditionals_stack as conditional_stack to match XS parser.
7d64cf13d2 is described below

commit 7d64cf13d2bdd536ebfb3da2a471c5c6c248253d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 1 17:11:34 2023 +0100

    * tp/Texinfo/ParserNonXS.pm (%parser_state_initialization),
    (_process_remaining_on_line, _end_line_misc_line, _parse_texi):
    rename conditionals_stack as conditional_stack to match XS parser.
---
 ChangeLog                 |  6 ++++++
 tp/Texinfo/ParserNonXS.pm | 16 ++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7c58b0c235..312c7101c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (%parser_state_initialization),
+       (_process_remaining_on_line, _end_line_misc_line, _parse_texi):
+       rename conditionals_stack as conditional_stack to match XS parser.
+
 2023-01-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (%parser_state_initialization)
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index a5d4b335a0..c31769a416 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -135,7 +135,7 @@ my %parser_state_initialization = (
                               # values are arrays for global multiple
                               # @-commands and a value for non multiple
                               # global @-commands.
-  'conditionals_stack' => [], # a stack of conditional commands that are
+  'conditional_stack' => [],  # a stack of conditional commands that are
                               # expanded.
   'raw_block_stack' => [],    # a stack of raw block commands that are nested.
   'floats' => {},             # key is the normalized float type, value is
@@ -3001,9 +3001,9 @@ sub _end_line_misc_line($$$)
           } else {
             print STDERR "END BLOCK $end_command\n" if ($self->{'DEBUG'});
             if ($block_commands{$end_command} eq 'conditional') {
-              if (@{$self->{'conditionals_stack'}}
-                and $self->{'conditionals_stack'}->[-1] eq $end_command) {
-                pop @{$self->{'conditionals_stack'}};
+              if (@{$self->{'conditional_stack'}}
+                and $self->{'conditional_stack'}->[-1] eq $end_command) {
+                pop @{$self->{'conditional_stack'}};
               } else {
                 $self->_command_error($current, $source_info,
                                   __("unmatched `%c%s'"), ord('@'), 'end');
@@ -5278,7 +5278,7 @@ sub _process_remaining_on_line($$$$)
                                                          if ($self->{'DEBUG'});
         }
         if ($ifvalue_true) {
-          push @{$self->{'conditionals_stack'}}, $command;
+          push @{$self->{'conditional_stack'}}, $command;
         } else {
           push @{$current->{'contents'}}, { 'cmdname' => $command,
                                             'parent' => $current,
@@ -6015,7 +6015,7 @@ sub _parse_texi($$$)
          if ($source_info);
       print STDERR "NEW LINE("
          .join('|', $self->_get_context_stack())
-         .":@{$self->{'conditionals_stack'}}:$line_text): $line";
+         .":@{$self->{'conditional_stack'}}:$line_text): $line";
       #print STDERR "CONTEXT_STACK 
".join('|',$self->_get_context_stack())."\n";
       #print STDERR "  $current: "
       #             .Texinfo::Common::debug_print_element_short($current)."\n";
@@ -6066,8 +6066,8 @@ sub _parse_texi($$$)
     }
   }
  finished_totally:
-  while (@{$self->{'conditionals_stack'}}) {
-    my $end_conditional = pop @{$self->{'conditionals_stack'}};
+  while (@{$self->{'conditional_stack'}}) {
+    my $end_conditional = pop @{$self->{'conditional_stack'}};
     $self->_line_error(sprintf(__("expected \@end %s"), $end_conditional),
                       $source_info);
   }



reply via email to

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