[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5185] Accept that @set and @ clear are not at the beginning of
From: |
Patrice Dumas |
Subject: |
[5185] Accept that @set and @ clear are not at the beginning of a line. |
Date: |
Fri, 22 Feb 2013 23:21:32 +0000 |
Revision: 5185
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5185
Author: pertusus
Date: 2013-02-22 23:21:31 +0000 (Fri, 22 Feb 2013)
Log Message:
-----------
Accept that @set and @clear are not at the beginning of a line.
Do not warn for @end in style command, as it may be the @end of
a conditional that is correct in that context.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/55conditionals.t
trunk/tp/t/results/invalid_nestings/style_not_closed_in_block_command.pl
trunk/tp/t/results/quotation/quotation_beginning_and_end_on_line.pl
Added Paths:
-----------
trunk/tp/t/results/conditionals/ifset_in_command.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-02-22 20:05:50 UTC (rev 5184)
+++ trunk/ChangeLog 2013-02-22 23:21:31 UTC (rev 5185)
@@ -3,6 +3,9 @@
* tp/Texinfo/Parser.pm: better handling of comments in @-commands
with line specially handled (@set, @ifset, @unmacro...).
Accept @set and @clear almost everywhere.
+ Accept that @set and @clear are not at the beginning of a line.
+ Do not warn for @end in style command, as it may be the @end of
+ a conditional that is correct in that context.
2013-02-21 Karl Berry <address@hidden>
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2013-02-22 20:05:50 UTC (rev 5184)
+++ trunk/tp/Texinfo/Parser.pm 2013-02-22 23:21:31 UTC (rev 5185)
@@ -329,6 +329,7 @@
foreach my $misc_not_begin_line ('comment', 'c', 'sp', 'refill',
'noindent', 'indent', 'columnfractions',
'tab', 'item', 'headitem', 'verbatiminclude',
+ 'set', 'clear',
'vskip', keys(%in_heading_commands)) {
delete $begin_line_commands{$misc_not_begin_line};
}
@@ -368,7 +369,7 @@
$in_full_text_commands{$command} = 1;
}
foreach my $misc_command_in_full_text('c', 'comment', 'refill', 'noindent',
- 'indent', 'columnfractions', 'set', 'clear') {
+ 'indent', 'columnfractions', 'set', 'clear', 'end') {
$in_full_text_commands{$misc_command_in_full_text} = 1;
}
Modified: trunk/tp/t/55conditionals.t
===================================================================
--- trunk/tp/t/55conditionals.t 2013-02-22 20:05:50 UTC (rev 5184)
+++ trunk/tp/t/55conditionals.t 2013-02-22 23:21:31 UTC (rev 5185)
@@ -140,6 +140,17 @@
@bye
@end ifset
'],
+['ifset_in_command',
+'
address@hidden
address@hidden x
+xset
address@hidden ifset
address@hidden x
+xclear
address@hidden ifclear
+}
+'],
['ignored_in_ifset',
'
@ifset notset
Added: trunk/tp/t/results/conditionals/ifset_in_command.pl
===================================================================
--- trunk/tp/t/results/conditionals/ifset_in_command.pl
(rev 0)
+++ trunk/tp/t/results/conditionals/ifset_in_command.pl 2013-02-22 23:21:31 UTC
(rev 5185)
@@ -0,0 +1,82 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'ifset_in_command'} = {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'xclear
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'file',
+ 'contents' => [],
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'ifset_in_command'}{'contents'}[0]{'parent'} =
$result_trees{'ifset_in_command'};
+$result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'args'}[0];
+$result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'args'}[0];
+$result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0];
+$result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[0]{'parent'} =
$result_trees{'ifset_in_command'}{'contents'}[1];
+$result_trees{'ifset_in_command'}{'contents'}[1]{'contents'}[1]{'parent'} =
$result_trees{'ifset_in_command'}{'contents'}[1];
+$result_trees{'ifset_in_command'}{'contents'}[1]{'parent'} =
$result_trees{'ifset_in_command'};
+
+$result_texis{'ifset_in_command'} = '
address@hidden
+xclear
+}
+';
+
+
+$result_texts{'ifset_in_command'} = '
+
+xclear
+
+';
+
+$result_errors{'ifset_in_command'} = [];
+
+
+1;
Modified:
trunk/tp/t/results/invalid_nestings/style_not_closed_in_block_command.pl
===================================================================
--- trunk/tp/t/results/invalid_nestings/style_not_closed_in_block_command.pl
2013-02-22 20:05:50 UTC (rev 5184)
+++ trunk/tp/t/results/invalid_nestings/style_not_closed_in_block_command.pl
2013-02-22 23:21:31 UTC (rev 5185)
@@ -83,7 +83,6 @@
'extra' => {
'command' => {},
'command_argument' => 'cartouche',
- 'invalid_nesting' => 1,
'spaces_after_command' => {},
'text_arg' => 'cartouche'
},
@@ -139,15 +138,6 @@
$result_errors{'style_not_closed_in_block_command'} = [
{
- 'error_line' => ':3: warning: @end should not appear in @code
-',
- 'file_name' => '',
- 'line_nr' => 3,
- 'macro' => '',
- 'text' => '@end should not appear in @code',
- 'type' => 'warning'
- },
- {
'error_line' => ':2: @code missing close brace
',
'file_name' => '',
Modified: trunk/tp/t/results/quotation/quotation_beginning_and_end_on_line.pl
===================================================================
--- trunk/tp/t/results/quotation/quotation_beginning_and_end_on_line.pl
2013-02-22 20:05:50 UTC (rev 5184)
+++ trunk/tp/t/results/quotation/quotation_beginning_and_end_on_line.pl
2013-02-22 23:21:31 UTC (rev 5185)
@@ -61,7 +61,6 @@
'extra' => {
'command' => {},
'command_argument' => 'quotation',
- 'invalid_nesting' => 1,
'spaces_after_command' => {},
'text_arg' => 'quotation'
},
@@ -116,15 +115,6 @@
'macro' => '',
'text' => '@end should only appear at a line beginning',
'type' => 'warning'
- },
- {
- 'error_line' => ':1: warning: @end should not appear in @quotation
-',
- 'file_name' => '',
- 'line_nr' => 1,
- 'macro' => '',
- 'text' => '@end should not appear in @quotation',
- 'type' => 'warning'
}
];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5185] Accept that @set and @ clear are not at the beginning of a line.,
Patrice Dumas <=