[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_parse_def): set par
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_parse_def): set parent for the definition args for the argument content gathered when there is no args to finish the item before. |
Date: |
Mon, 06 Mar 2023 05:43:51 -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 f6bbf363e8 * tp/Texinfo/ParserNonXS.pm (_parse_def): set parent for
the definition args for the argument content gathered when there is no args to
finish the item before.
f6bbf363e8 is described below
commit f6bbf363e82f0065f047eb20abc72426fdf7b167
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Mar 6 11:43:39 2023 +0100
* tp/Texinfo/ParserNonXS.pm (_parse_def): set parent for the
definition args for the argument content gathered when there
is no args to finish the item before.
* tp/Makefile.tres, tp/t/19def.t: add def_groupings_args to
test grouping of def args more.
---
tp/Texinfo/ParserNonXS.pm | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 9614d59f4a..f476013d4d 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -3073,9 +3073,16 @@ sub _parse_def($$$$)
$i++;
last if (! defined($arg));
}
+ # if the end was reached without args to trigger gathering the started
+ # argument content, it is gathered here.
if (scalar(@$argument_content) > 1) {
my $e = {'contents' => $argument_content,
- 'type' => 'def_aggregate' };
+ 'type' => 'def_aggregate',
+ 'parent' => $current,
+ };
+ for my $e2 (@$argument_content) {
+ $e2->{'parent'} = $e;
+ }
push @result, [$arg, $e];
# Replace in the main tree.
splice @new_contents, $i - scalar(@$argument_content),
@@ -3084,6 +3091,7 @@ sub _parse_def($$$$)
push @result, [$arg, $argument_content->[0]];
}
+ # at this point, @contents corresponds to the @def* args
if (scalar(@contents) > 0) {
splice @new_contents, -scalar(@contents);
}
@@ -3092,7 +3100,7 @@ sub _parse_def($$$$)
@contents );
@new_contents = (@new_contents, @contents);
- # Create the part of the def_args array for any arguments.
+ # Create the part of the parsed def line array for any arguments.
my @args_results;
while (@contents) {
my $spaces;
@@ -3634,7 +3642,6 @@ sub _end_line_def_line($$$)
__('missing category for @%s'),
$current->{'extra'}->{'original_def_cmdname'});
} else {
- #$current->{'extra'}->{'def_args'} = $arguments;
my $def_parsed_hash = {};
foreach my $arg (@$arguments) {
die if (!defined($arg->[0]));
- Prev by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_parse_def): set parent for the definition args for the argument content gathered when there is no args to finish the item before.
- Next by Date:
branch master updated: * tp/Texinfo/Common.pm (_copy_tree, _substitute_references_in_array) (_substitute_references): copy info keys, fix _substitute_references calls in which new and current were swapped, add more checks, enable extra key hash handling setup for index_entry for all the extra key hashes, add a level argument for nicer debug messages.
- Previous by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_parse_def): set parent for the definition args for the argument content gathered when there is no args to finish the item before.
- Next by thread:
branch master updated: * tp/Texinfo/Common.pm (_copy_tree, _substitute_references_in_array) (_substitute_references): copy info keys, fix _substitute_references calls in which new and current were swapped, add more checks, enable extra key hash handling setup for index_entry for all the extra key hashes, add a level argument for nicer debug messages.
- Index(es):