[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_o
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (read_comment) (process_remaining_on_line): handle nested @ignore. Gavin report. Add read_comment() to get a comment, taken mainly from handle_block_command. |
Date: |
Tue, 27 Dec 2022 16:14:12 -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 0d6a1342d2 * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command),
tp/Texinfo/XS/parsetexi/parser.c (read_comment) (process_remaining_on_line):
handle nested @ignore. Gavin report. Add read_comment() to get a comment,
taken mainly from handle_block_command.
0d6a1342d2 is described below
commit 0d6a1342d224b8533bb071686503d2950d0973c4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Dec 27 21:52:56 2022 +0100
* tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command),
tp/Texinfo/XS/parsetexi/parser.c (read_comment)
(process_remaining_on_line): handle nested @ignore. Gavin report.
Add read_comment() to get a comment, taken mainly from
handle_block_command.
* tp/t/55conditionals.t, tp/Makefile.tres: add test
ignore_spaces_and_comments with comments and spaces on @ignore lines.
---
ChangeLog | 12 +
tp/Makefile.tres | 1 +
tp/TODO | 9 +-
tp/Texinfo/ParserNonXS.pm | 43 +++-
tp/Texinfo/XS/parsetexi/handle_commands.c | 16 +-
tp/Texinfo/XS/parsetexi/parser.c | 113 ++++++++-
tp/Texinfo/XS/parsetexi/parser.h | 1 +
tp/t/55conditionals.t | 17 ++
...ted_ignore.pl => ignore_spaces_and_comments.pl} | 141 ++++++++---
tp/t/results/conditionals/nested_ignore.pl | 257 +++++++++++----------
10 files changed, 426 insertions(+), 184 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 166e384510..0ea45875f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,18 @@
(\indexnofonts): Set \indexnofontstrue. Definitions in
\indexnofonts still override those from \definedummies.
+2022-12-27 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line),
+ tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command),
+ tp/Texinfo/XS/parsetexi/parser.c (read_comment)
+ (process_remaining_on_line): handle nested @ignore. Gavin report.
+ Add read_comment() to get a comment, taken mainly from
+ handle_block_command.
+
+ * tp/t/55conditionals.t, tp/Makefile.tres: add test
+ ignore_spaces_and_comments with comments and spaces on @ignore lines.
+
2022-12-27 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/LaTeX.pm (_latex_header), doc/texinfo.texi
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index c7988370d9..cf388f83eb 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -105,6 +105,7 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/conditionals/ifset_in_command.pl \
t/results/conditionals/ifset_nonalpha.pl \
t/results/conditionals/ignore_not_closed.pl \
+ t/results/conditionals/ignore_spaces_and_comments.pl \
t/results/conditionals/ignored_in_ifset.pl \
t/results/conditionals/info_ifinfo_ifnotplaintext.pl \
t/results/conditionals/info_ifplaintext.pl \
diff --git a/tp/TODO b/tp/TODO
index 952bfb6163..a92f06b147 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,6 +13,13 @@ Before next release
Bugs
====
+Test for nested @macro
+@macrototo
+and check that with XS this is as if it was @macro
+
+test with nested ignore with something a comment, and with
+@-commands before a comment
+
HTML API
========
@@ -48,7 +55,7 @@ Delayed bugs
See message/thread from Reißner Ernst: Feature request: api docs
-In @inline* ignore arguments, @value and user macros should not be
+In @inline* ignored arguments, @value and user macros should not be
expanded. For example
@set closebrace }
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 58deeff6a2..4dfe53c5c0 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -4133,15 +4133,46 @@ sub _process_remaining_on_line($$$$)
and $block_commands{$current->{'cmdname'}}
and ($block_commands{$current->{'cmdname'}} eq 'raw')) {
# r?macro may be nested
- if (($current->{'cmdname'} eq 'macro'
- or $current->{'cmdname'} eq 'rmacro')
- and $line =~ /^\s*\@r?macro\s+/) {
- $line =~ s/\s*\@(r?macro)//;
+ if ((($current->{'cmdname'} eq 'macro'
+ or $current->{'cmdname'} eq 'rmacro')
+ and $line =~ /^\s*\@(r?macro)\s+/)
+ or ($current->{'cmdname'} eq 'ignore'
+ and $line =~ /^\s*\@(ignore)(\@|\s+)/)) {
push @{$current->{'contents'}}, { 'cmdname' => $1,
'parent' => $current,
- 'contents' => [],
- 'info' => {'arg_line' => $line }};
+ 'contents' => [],};
$current = $current->{'contents'}->[-1];
+ if ($current->{'cmdname'} eq 'ignore') {
+ $line =~ s/\s*\@ignore(\s*)//;
+ if ($1 ne '') {
+ $current->{'args'} = [
+ {'type' => 'block_line_arg', 'parent' => $current,
+ 'info' => {'spaces_after_argument' => $1},}
+ ];
+ }
+ if ($line =~ /\@(c|comment)((\@|\s+).*)?$/) {
+ my $comment_command = $1;
+ my $comment_text = $2;
+ if (not exists($current->{'args'})) {
+ $current->{'args'} = [
+ {'type' => 'block_line_arg', 'parent' => $current,
+ 'info' => {}}
+ ];
+ }
+ my $comment_element = {'cmdname' => $comment_command, 'args' => [],
+ 'extra' => {'misc_args' => [$comment_text]},
+ 'parent' => $current->{'args'}->[-1]};
+ push @{$comment_element->{'args'}}, {'type' => 'misc_arg',
+ 'parent' => $comment_element, 'text' => $comment_text};
+ $current->{'args'}->[-1]->{'info'}->{'comment_at_end'}
+ = $comment_element;
+ }
+ } else {
+ $line =~ s/\s*\@r?macro//;
+ $current->{'info'} = {'arg_line' => $line };
+ }
+ print STDERR "RAW SECOND LEVEL \@$current->{'cmdname'}\n"
+ if ($self->{'DEBUG'});
$retval = $GET_A_NEW_LINE;
goto funexit;
} elsif ($line =~ /^(\s*?)\@end\s+([a-zA-Z][\w-]*)/
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index bae1a83f5a..88563448a9 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -792,16 +792,12 @@ handle_block_command (ELEMENT *current, char **line_inout,
/* Check for a comment at the end of the line. */
if (*p)
{
- if (memcmp (p, "@c", 2) == 0)
- {
- p += 2;
- if (memcmp (p, "omment", 6) == 0)
- p += 7;
- if (*p && *p != '@' && !strchr (whitespace_chars, *p))
- goto bad_value; /* @c or @comment not terminated. */
- }
- else
- goto bad_value; /* Trailing characters on line. */
+ char *cmd_name;
+
+ if (read_comment (p, &cmd_name))
+ free (cmd_name);
+ else
+ goto bad_value;
}
}
if (1)
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 4ac79e9abe..4cb23fd774 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -87,6 +87,26 @@ element_type_name (ELEMENT *e)
return element_type_names[(e)->type];
}
+char *
+read_comment (char *line, char **comment_command)
+{
+ char *p = line;
+
+ if (memcmp (p, "@c", 2) == 0)
+ {
+ p += 2;
+ if (memcmp (p, "omment", 6) == 0)
+ p += 7;
+ if (*p && *p != '@' && !strchr (whitespace_chars, *p))
+ return 0; /* @c or @comment not terminated. */
+ /* FIXME check -1 is correct */
+ *comment_command = strndup(line, p - line - 1);
+ }
+ else
+ return 0; /* Trailing characters on line. */
+ return p;
+}
+
/* Return 1 if the element expansion is all whitespace */
int
check_space_element (ELEMENT *e)
@@ -1100,10 +1120,10 @@ process_remaining_on_line (ELEMENT **current_inout,
char **line_inout)
&& (command_data(current->cmd).data == BLOCK_raw))
{
char *p = line;
+ enum command_id cmd = 0;
/* Check if we are using a macro within a macro. */
if (current->cmd == CM_macro || current->cmd == CM_rmacro)
{
- enum command_id cmd = 0;
p += strspn (p, whitespace_chars);
if (!strncmp (p, "@macro", strlen ("@macro")))
{
@@ -1115,17 +1135,92 @@ process_remaining_on_line (ELEMENT **current_inout,
char **line_inout)
p += strlen ("@rmacro");
cmd = CM_rmacro;
}
- if (cmd)
+ }
+ else if (current->cmd == CM_ignore)
+ {
+ p += strspn (p, whitespace_chars);
+ if (!strncmp (p, "@ignore", strlen ("@ignore")))
+ {
+ p += strlen ("@ignore");
+ if (!(*p && *p != '@' && !strchr (whitespace_chars, *p)))
+ cmd = CM_ignore;
+ }
+ }
+ if (cmd)
+ {
+ ELEMENT *e = new_element (ET_NONE);
+ e->cmd = cmd;
+ line = p;
+ add_to_element_contents (current, e);
+ current = e;
+ if (cmd == CM_ignore)
+ {
+ size_t len_spaces = strspn (p, whitespace_chars);
+
+ if (len_spaces)
+ {
+ ELEMENT *e;
+ char *spaces_after_arg = strndup (p, len_spaces);
+ p += len_spaces;
+
+ e = new_element (ET_block_line_arg);
+ add_info_string (e, "spaces_after_argument",
+ spaces_after_arg);
+ add_to_element_args (current, e);
+ }
+ while (*p)
+ {
+ p = strchr (p, 'p');
+ if (p)
+ {
+ char *cmd_name;
+ char *comment_position = read_comment (p, &cmd_name);
+ if (comment_position)
+ {
+ ELEMENT *args;
+ ELEMENT *e;
+ ELEMENT *comment_e;
+ ELEMENT *misc_arg_e;
+ ELEMENT *block_line_arg_e;
+
+ if (current->args.number == 0)
+ {
+ block_line_arg_e
+ = new_element (ET_block_line_arg);
+ add_to_element_args (current, block_line_arg_e);
+ }
+ else
+ block_line_arg_e
+ = args_child_by_index (current, 0);
+
+ args = new_element (ET_NONE);
+ e = new_element (ET_NONE);
+ text_append (&e->text, p);
+ add_to_element_contents (args, e);
+
+ misc_arg_e = new_element (ET_misc_arg);
+ text_append (&misc_arg_e->text, p);
+
+ comment_e = new_element (ET_NONE);
+ comment_e->cmd = lookup_command (cmd_name);
+ add_extra_misc_args (comment_e, "misc_args", args);
+ add_to_element_args (comment_e, misc_arg_e);
+
+ add_info_element_oot (block_line_arg_e,
+ "comment_at_end",
+ comment_e);
+ }
+ }
+ else
+ break;
+ }
+ }
+ else
{
- ELEMENT *e = new_element (ET_NONE);
- e->cmd = cmd;
- line = p;
- add_to_element_contents (current, e);
add_info_string_dup (e, "arg_line", line);
- current = e;
- retval = GET_A_NEW_LINE;
- goto funexit;
}
+ retval = GET_A_NEW_LINE;
+ goto funexit;
}
/* Else check if line is "@end ..." for current command. */
if (is_end_current_command (current, &p, &end_cmd))
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 8c16f127e9..42388ce8b1 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -163,6 +163,7 @@ ELEMENT *end_preformatted (ELEMENT *current,
enum command_id closed_block_command,
enum command_id interrupting_command);
char *read_command_name (char **ptr);
+char *read_comment (char *line, char **comment_command);
char *read_flag_name (char **ptr);
ELEMENT *merge_text (ELEMENT *current, char *text);
void start_empty_line_after_command (ELEMENT *current, char **line_inout,
diff --git a/tp/t/55conditionals.t b/tp/t/55conditionals.t
index 4e7e13ef4e..5f21da1582 100644
--- a/tp/t/55conditionals.t
+++ b/tp/t/55conditionals.t
@@ -35,6 +35,23 @@ Y5
Y6
@end ifset
'],
+['ignore_spaces_and_comments',
+'@ignore
+No space no comment
+@end ignore
+
+@ignore
+Spaces no comment
+@end ignore
+
+@ignore@c no space comment
+Comment
+@end ignore
+
+@ignore @comment space comment
+Space Comment
+@end ignore
+'],
['nested_ignore',
'@ignore
@ignore
diff --git a/tp/t/results/conditionals/nested_ignore.pl
b/tp/t/results/conditionals/ignore_spaces_and_comments.pl
similarity index 59%
copy from tp/t/results/conditionals/nested_ignore.pl
copy to tp/t/results/conditionals/ignore_spaces_and_comments.pl
index e1e5de384b..2f8e627512 100644
--- a/tp/t/results/conditionals/nested_ignore.pl
+++ b/tp/t/results/conditionals/ignore_spaces_and_comments.pl
@@ -5,7 +5,7 @@ use vars qw(%result_texis %result_texts %result_trees
%result_errors
use utf8;
-$result_trees{'nested_ignore'} = {
+$result_trees{'ignore_spaces_and_comments'} = {
'contents' => [
{
'contents' => [
@@ -22,12 +22,7 @@ $result_trees{'nested_ignore'} = {
'cmdname' => 'ignore',
'contents' => [
{
- 'text' => '@ignore
-',
- 'type' => 'raw'
- },
- {
- 'text' => '
+ 'text' => 'No space no comment
',
'type' => 'raw'
},
@@ -55,7 +50,7 @@ $result_trees{'nested_ignore'} = {
},
'source_info' => {
'file_name' => '',
- 'line_nr' => 4,
+ 'line_nr' => 3,
'macro' => ''
}
}
@@ -75,7 +70,7 @@ $result_trees{'nested_ignore'} = {
'args' => [
{
'info' => {
- 'spaces_after_argument' => '
+ 'spaces_after_argument' => '
'
},
'type' => 'block_line_arg'
@@ -84,12 +79,7 @@ $result_trees{'nested_ignore'} = {
'cmdname' => 'ignore',
'contents' => [
{
- 'text' => '@end iftex
-',
- 'type' => 'raw'
- },
- {
- 'text' => '@ifinfo
+ 'text' => 'Spaces no comment
',
'type' => 'raw'
},
@@ -117,14 +107,14 @@ $result_trees{'nested_ignore'} = {
},
'source_info' => {
'file_name' => '',
- 'line_nr' => 9,
+ 'line_nr' => 7,
'macro' => ''
}
}
],
'source_info' => {
'file_name' => '',
- 'line_nr' => 6,
+ 'line_nr' => 5,
'macro' => ''
}
},
@@ -137,8 +127,22 @@ $result_trees{'nested_ignore'} = {
'args' => [
{
'info' => {
- 'spaces_after_argument' => '
+ 'comment_at_end' => {
+ 'args' => [
+ {
+ 'text' => ' no space comment
+',
+ 'type' => 'misc_arg'
+ }
+ ],
+ 'cmdname' => 'c',
+ 'extra' => {
+ 'misc_args' => [
+ ' no space comment
'
+ ]
+ }
+ }
},
'type' => 'block_line_arg'
}
@@ -146,12 +150,78 @@ $result_trees{'nested_ignore'} = {
'cmdname' => 'ignore',
'contents' => [
{
- 'text' => '@end ifclear
+ 'text' => 'Comment
',
'type' => 'raw'
},
{
- 'text' => '@ifclear
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'ignore'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'ignore'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'info' => {
+ 'comment_at_end' => {
+ 'args' => [
+ {
+ 'text' => ' space comment
+',
+ 'type' => 'misc_arg'
+ }
+ ],
+ 'cmdname' => 'comment',
+ 'extra' => {
+ 'misc_args' => [
+ ' space comment
+'
+ ]
+ }
+ }
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'ignore',
+ 'contents' => [
+ {
+ 'text' => 'Space Comment
',
'type' => 'raw'
},
@@ -179,14 +249,17 @@ $result_trees{'nested_ignore'} = {
},
'source_info' => {
'file_name' => '',
- 'line_nr' => 14,
+ 'line_nr' => 15,
'macro' => ''
}
}
],
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
'source_info' => {
'file_name' => '',
- 'line_nr' => 11,
+ 'line_nr' => 13,
'macro' => ''
}
}
@@ -197,31 +270,33 @@ $result_trees{'nested_ignore'} = {
'type' => 'document_root'
};
-$result_texis{'nested_ignore'} = '@ignore
-@ignore
+$result_texis{'ignore_spaces_and_comments'} = '@ignore
+No space no comment
+@end ignore
+@ignore
+Spaces no comment
@end ignore
-@ignore
-@end iftex
-@ifinfo
+@ignore@c no space comment
+Comment
@end ignore
-@ignore
-@end ifclear
-@ifclear
+@ignore @comment space comment
+Space Comment
@end ignore
';
-$result_texts{'nested_ignore'} = '
+$result_texts{'ignore_spaces_and_comments'} = '
+
';
-$result_errors{'nested_ignore'} = [];
+$result_errors{'ignore_spaces_and_comments'} = [];
-$result_floats{'nested_ignore'} = {};
+$result_floats{'ignore_spaces_and_comments'} = {};
1;
diff --git a/tp/t/results/conditionals/nested_ignore.pl
b/tp/t/results/conditionals/nested_ignore.pl
index e1e5de384b..4ad4d4fd57 100644
--- a/tp/t/results/conditionals/nested_ignore.pl
+++ b/tp/t/results/conditionals/nested_ignore.pl
@@ -21,172 +21,171 @@ $result_trees{'nested_ignore'} = {
],
'cmdname' => 'ignore',
'contents' => [
- {
- 'text' => '@ignore
-',
- 'type' => 'raw'
- },
- {
- 'text' => '
-',
- 'type' => 'raw'
- },
{
'args' => [
{
- 'contents' => [
- {
- 'text' => 'ignore'
- }
- ],
'info' => {
'spaces_after_argument' => '
'
},
- 'type' => 'line_arg'
+ 'type' => 'block_line_arg'
}
],
- 'cmdname' => 'end',
- 'extra' => {
- 'text_arg' => 'ignore'
- },
- 'info' => {
- 'spaces_before_argument' => ' '
- },
- 'source_info' => {
- 'file_name' => '',
- 'line_nr' => 4,
- 'macro' => ''
- }
- }
- ],
- 'source_info' => {
- 'file_name' => '',
- 'line_nr' => 1,
- 'macro' => ''
- }
- },
- {
- 'text' => '
+ 'cmdname' => 'ignore',
+ 'contents' => [
+ {
+ 'text' => '
',
- 'type' => 'empty_line'
- },
- {
- 'args' => [
- {
- 'info' => {
- 'spaces_after_argument' => '
+ 'type' => 'raw'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'ignore'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
'
- },
- 'type' => 'block_line_arg'
- }
- ],
- 'cmdname' => 'ignore',
- 'contents' => [
- {
- 'text' => '@end iftex
-',
- 'type' => 'raw'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'ignore'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ }
+ }
+ ]
},
{
- 'text' => '@ifinfo
+ 'text' => '
',
'type' => 'raw'
},
{
'args' => [
{
- 'contents' => [
- {
- 'text' => 'ignore'
- }
- ],
'info' => {
'spaces_after_argument' => '
'
},
- 'type' => 'line_arg'
+ 'type' => 'block_line_arg'
}
],
- 'cmdname' => 'end',
- 'extra' => {
- 'text_arg' => 'ignore'
- },
- 'info' => {
- 'spaces_before_argument' => ' '
- },
- 'source_info' => {
- 'file_name' => '',
- 'line_nr' => 9,
- 'macro' => ''
- }
- }
- ],
- 'source_info' => {
- 'file_name' => '',
- 'line_nr' => 6,
- 'macro' => ''
- }
- },
- {
- 'text' => '
+ 'cmdname' => 'ignore',
+ 'contents' => [
+ {
+ 'text' => '@end iftex
',
- 'type' => 'empty_line'
- },
- {
- 'args' => [
- {
- 'info' => {
- 'spaces_after_argument' => '
-'
- },
- 'type' => 'block_line_arg'
- }
- ],
- 'cmdname' => 'ignore',
- 'contents' => [
- {
- 'text' => '@end ifclear
+ 'type' => 'raw'
+ },
+ {
+ 'text' => '@ifinfo
',
- 'type' => 'raw'
+ 'type' => 'raw'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'ignore'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'ignore'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ }
+ }
+ ]
},
{
- 'text' => '@ifclear
+ 'text' => '
',
'type' => 'raw'
},
{
'args' => [
{
- 'contents' => [
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'ignore',
+ 'contents' => [
+ {
+ 'text' => '@end ifclear
+',
+ 'type' => 'raw'
+ },
+ {
+ 'text' => '@ifclear
+',
+ 'type' => 'raw'
+ },
+ {
+ 'args' => [
{
- 'text' => 'ignore'
+ 'contents' => [
+ {
+ 'text' => 'ignore'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
}
],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'ignore'
+ },
'info' => {
- 'spaces_after_argument' => '
-'
+ 'spaces_before_argument' => ' '
},
- 'type' => 'line_arg'
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 14,
+ 'macro' => ''
+ }
}
- ],
- 'cmdname' => 'end',
- 'extra' => {
- 'text_arg' => 'ignore'
- },
- 'info' => {
- 'spaces_before_argument' => ' '
- },
- 'source_info' => {
- 'file_name' => '',
- 'line_nr' => 14,
- 'macro' => ''
- }
+ ]
}
],
'source_info' => {
'file_name' => '',
- 'line_nr' => 11,
+ 'line_nr' => 1,
'macro' => ''
}
}
@@ -214,11 +213,19 @@ $result_texis{'nested_ignore'} = '@ignore
';
-$result_texts{'nested_ignore'} = '
+$result_texts{'nested_ignore'} = '';
-';
-
-$result_errors{'nested_ignore'} = [];
+$result_errors{'nested_ignore'} = [
+ {
+ 'error_line' => 'no matching `@end ignore\'
+',
+ 'file_name' => '',
+ 'line_nr' => 14,
+ 'macro' => '',
+ 'text' => 'no matching `@end ignore\'',
+ 'type' => 'error'
+ }
+];
$result_floats{'nested_ignore'} = {};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (read_comment) (process_remaining_on_line): handle nested @ignore. Gavin report. Add read_comment() to get a comment, taken mainly from handle_block_command.,
Patrice Dumas <=