[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_remove_empty_conten
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_remove_empty_content, _close_container), tp/Texinfo/XS/parsetexi/close.c (remove_empty_content) (close_container): synchronize debug messages across the parsers. Use more print_element_debug instead of debug_print_element in XS parser. |
Date: |
Sat, 08 Jul 2023 09:42:53 -0400 |
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 b100fc65be * tp/Texinfo/ParserNonXS.pm (_remove_empty_content,
_close_container), tp/Texinfo/XS/parsetexi/close.c (remove_empty_content)
(close_container): synchronize debug messages across the parsers. Use more
print_element_debug instead of debug_print_element in XS parser.
b100fc65be is described below
commit b100fc65be2d497503d1c143e40a51458628fed6
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jul 8 15:42:44 2023 +0200
* tp/Texinfo/ParserNonXS.pm (_remove_empty_content, _close_container),
tp/Texinfo/XS/parsetexi/close.c (remove_empty_content)
(close_container): synchronize debug messages across the parsers.
Use more print_element_debug instead of debug_print_element in XS
parser.
---
ChangeLog | 8 ++++++++
tp/Texinfo/ParserNonXS.pm | 7 +++++--
tp/Texinfo/XS/parsetexi/close.c | 13 +++++++------
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e6612a9250..6a9ffc936e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-07-08 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/ParserNonXS.pm (_remove_empty_content, _close_container),
+ tp/Texinfo/XS/parsetexi/close.c (remove_empty_content)
+ (close_container): synchronize debug messages across the parsers.
+ Use more print_element_debug instead of debug_print_element in XS
+ parser.
+
2023-07-08 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Common.pm (debug_command_name, debug_print_element),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index a133a980f2..819f6ee031 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1549,7 +1549,7 @@ sub _remove_empty_content($$)
_transfer_source_marks($child_element, $current);
print STDERR "REMOVE empty child "
.Texinfo::Common::debug_print_element($child_element)
- .' '.Texinfo::Common::debug_print_element($current)."\n"
+ .' from '.Texinfo::Common::debug_print_element($current)."\n"
if ($self->{'DEBUG'});
_pop_element_from_contents($self, $current);
}
@@ -1573,6 +1573,9 @@ sub _close_container($$)
delete $current->{'type'} if ($current->{'type'} ne 'before_item');
} else {
$element_to_remove = $current;
+ print STDERR "CONTAINER EMPTY "
+ .Texinfo::Common::debug_print_element($current, 1)."\n"
+ if ($self->{'DEBUG'});
}
}
$current = $current->{'parent'};
@@ -1585,7 +1588,7 @@ sub _close_container($$)
and scalar(@{$current->{'contents'}})
and $current->{'contents'}->[-1] eq $element_to_remove) {
print STDERR "REMOVE empty type "
- .Texinfo::Common::debug_print_element($element_to_remove)."\n"
+ .Texinfo::Common::debug_print_element($element_to_remove, 1)."\n"
if ($self->{'DEBUG'});
_pop_element_from_contents($self, $current);
}
diff --git a/tp/Texinfo/XS/parsetexi/close.c b/tp/Texinfo/XS/parsetexi/close.c
index cdf789da41..1eb52c5dcc 100644
--- a/tp/Texinfo/XS/parsetexi/close.c
+++ b/tp/Texinfo/XS/parsetexi/close.c
@@ -124,8 +124,9 @@ remove_empty_content (ELEMENT *current)
{
transfer_source_marks (child_element, current);
- debug_nonl ("REMOVE empty child ");
- debug_print_element (child_element, 1); debug ("");
+ debug ("REMOVE empty child %s from %s",
+ print_element_debug(child_element, 0),
+ print_element_debug(current, 0));
destroy_element (pop_element_from_contents (current));
}
}
@@ -154,8 +155,8 @@ close_container (ELEMENT *current)
else
{
element_to_remove = current;
- debug_nonl ("CONTAINER EMPTY ");
- debug_print_element (current, 1); debug ("");
+ debug ("CONTAINER EMPTY %s",
+ print_element_debug(current, 1));
}
}
@@ -168,8 +169,8 @@ close_container (ELEMENT *current)
a manual */
if (last_child == element_to_remove)
{
- debug_nonl ("REMOVE empty type ");
- debug_print_element (last_child, 1); debug ("");
+ debug ("REMOVE empty type %s",
+ print_element_debug(last_child, 1));
destroy_element (pop_element_from_contents (current));
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/ParserNonXS.pm (_remove_empty_content, _close_container), tp/Texinfo/XS/parsetexi/close.c (remove_empty_content) (close_container): synchronize debug messages across the parsers. Use more print_element_debug instead of debug_print_element in XS parser.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Common.pm (debug_command_name, debug_print_element), tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/debug.c (debug_command_name) (print_element_debug), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): escape \n and \t in command name in debug messages for better readability.
- Next by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_close_current), tp/Texinfo/XS/parsetexi/close.c (close_current): use the current element returned by end_line_misc_line and end_line_starting_block, and get the parent/call close_container for each type.
- Previous by thread:
branch master updated: * tp/Texinfo/Common.pm (debug_command_name, debug_print_element), tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/debug.c (debug_command_name) (print_element_debug), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): escape \n and \t in command name in debug messages for better readability.
- Next by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_close_current), tp/Texinfo/XS/parsetexi/close.c (close_current): use the current element returned by end_line_misc_line and end_line_starting_block, and get the parent/call close_container for each type.
- Index(es):