[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8298] labels_information
From: |
gavinsmith0123 |
Subject: |
[8298] labels_information |
Date: |
Wed, 17 Oct 2018 05:43:33 -0400 (EDT) |
Revision: 8298
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8298
Author: gavin
Date: 2018-10-17 05:43:33 -0400 (Wed, 17 Oct 2018)
Log Message:
-----------
labels_information
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Common.pm
trunk/tp/Texinfo/XS/parsetexi/Parsetexi.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-10-17 09:36:09 UTC (rev 8297)
+++ trunk/ChangeLog 2018-10-17 09:43:33 UTC (rev 8298)
@@ -1,3 +1,8 @@
+2018-10-17 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Common.pm (labels_information): Avoiding creating
+ 'extra' hash by mistake.
+
2018-10-16 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm,
Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm 2018-10-17 09:36:09 UTC (rev 8297)
+++ trunk/tp/Texinfo/Common.pm 2018-10-17 09:43:33 UTC (rev 8298)
@@ -2586,7 +2586,8 @@
}
}
}
- if (defined $target->{'extra'}->{'node_content'}) {
+ if (defined $target->{'extra'}
+ and defined $target->{'extra'}->{'node_content'}) {
my $normalized =
Texinfo::Convert::NodeNameNormalization::normalize_node({'contents' =>
$target->{'extra'}->{'node_content'}});
if ($normalized !~ /[^-]/) {
Modified: trunk/tp/Texinfo/XS/parsetexi/Parsetexi.pm
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/Parsetexi.pm 2018-10-17 09:36:09 UTC (rev
8297)
+++ trunk/tp/Texinfo/XS/parsetexi/Parsetexi.pm 2018-10-17 09:43:33 UTC (rev
8298)
@@ -173,7 +173,6 @@
} elsif ($key eq 'SHOW_MENU') {
conf_set_show_menu ($conf->{$key});
} elsif ($key eq 'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME') {
- die;
conf_set_IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME ($conf->{$key});
} elsif ($key eq 'CPP_LINE_DIRECTIVES') {
conf_set_CPP_LINE_DIRECTIVES($conf->{$key});
@@ -433,73 +432,9 @@
}
# Setup labels and nodes info and return labels
-# FIXME : should share this with the non-XS code.
sub labels_information($)
{
- my $self = shift;
-
- if (defined $self->{'targets'}) {
- my %labels = ();
- for my $target (@{$self->{'targets'}}) {
- if ($target->{'cmdname'} eq 'node') {
- if ($target->{'extra'}->{'nodes_manuals'}) {
- for my $node_manual (@{$target->{'extra'}{'nodes_manuals'}}) {
- if (defined $node_manual
- and defined $node_manual->{'node_content'}) {
- my $normalized =
Texinfo::Convert::NodeNameNormalization::normalize_node({'contents' =>
$node_manual->{'node_content'}});
- $node_manual->{'normalized'} = $normalized;
- }
- }
- }
- }
- if (defined $target->{'extra'}
- and defined $target->{'extra'}->{'node_content'}) {
- my $normalized =
Texinfo::Convert::NodeNameNormalization::normalize_node({'contents' =>
$target->{'extra'}->{'node_content'}});
-
- if ($normalized !~ /[^-]/) {
- $self->line_error (sprintf(__("empty node name after expansion
`%s'"),
- Texinfo::Convert::Texinfo::convert({'contents'
- => $target->{'extra'}->{'node_content'}})),
- $target->{'line_nr'});
- delete $target->{'extra'}->{'node_content'};
- } else {
- if (defined $labels{$normalized}) {
- $self->line_error(
- sprintf(__("address@hidden `%s' previously defined"),
- $target->{'cmdname'},
- Texinfo::Convert::Texinfo::convert({'contents' =>
- $target->{'extra'}->{'node_content'}})),
- $target->{'line_nr'});
- $self->line_error(
- sprintf(__("here is the previous definition as address@hidden"),
- $labels{$normalized}->{'cmdname'}),
- $labels{$normalized}->{'line_nr'});
- delete $target->{'extra'}->{'node_content'};
- } else {
- $labels{$normalized} = $target;
- $target->{'extra'}->{'normalized'} = $normalized;
- if ($target->{'cmdname'} eq 'node') {
- if ($target->{'extra'}
- and $target->{'extra'}{'node_argument'}) {
- $target->{'extra'}{'node_argument'}{'normalized'}
- = $normalized;
- }
- push @{$self->{'nodes'}}, $target;
- }
- }
- }
- } else {
- if ($target->{'cmdname'} eq 'node') {
- $self->line_error (sprintf(__("empty argument in address@hidden"),
- $target->{'cmdname'}), $target->{'line_nr'});
- delete $target->{'extra'}->{'node_content'};
- }
- }
- }
- $self->{'labels'} = \%labels;
- delete $self->{'targets'};
- }
- return $self->{'labels'};
+ goto &Texinfo::Common::labels_information;
}
BEGIN {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8298] labels_information,
gavinsmith0123 <=