[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7126] parsetexi update
From: |
Gavin D. Smith |
Subject: |
[7126] parsetexi update |
Date: |
Sun, 24 Apr 2016 10:30:48 +0000 |
Revision: 7126
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7126
Author: gavin
Date: 2016-04-24 10:30:48 +0000 (Sun, 24 Apr 2016)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/tp/parsetexi/end_line.c
trunk/tp/parsetexi/separator.c
Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c 2016-04-24 09:43:26 UTC (rev 7125)
+++ trunk/tp/parsetexi/end_line.c 2016-04-24 10:30:48 UTC (rev 7126)
@@ -221,22 +221,24 @@
line_args = new_element (ET_NONE);
cmd = line_command->cmd;
- if (arg->contents.number == 0)
- {
- /*command_error (line_command, "@%s missing argument",
- command_name (cmd));*/
- return 0;
- }
+ /* Find the argument, and check there is only one. */
i = 0;
while (i < arg->contents.number)
{
- /* TODO: Ignore all the elements checked in
- trim_spaces_comment_from_content. */
+ /* Ignore all the elements checked
+ in trim_spaces_comment_from_content. */
+ enum element_type t;
+ t = contents_child_by_index(arg, i)->type;
- if (contents_child_by_index(arg, i)->type
- == ET_empty_spaces_after_command
- || contents_child_by_index(arg, i)->type == ET_spaces_at_end)
+ if (t == ET_empty_spaces_after_command
+ || t == ET_empty_spaces_before_argument
+ || t == ET_empty_space_at_end_def_bracketed
+ || t == ET_empty_spaces_after_close_brace
+ || t == ET_spaces_at_end
+ || t == ET_space_at_end_block_command
+ || contents_child_by_index(arg, i)->cmd == CM_c
+ || contents_child_by_index(arg, i)->cmd == CM_comment)
{
i++;
continue;
@@ -256,7 +258,7 @@
}
}
- if (!argarg)
+ if (!argarg || argarg->text.end == 0)
{
command_error (line_command, "@%s missing argument", command_name(cmd));
add_extra_string (line_command, "missing_argument", "1");
Modified: trunk/tp/parsetexi/separator.c
===================================================================
--- trunk/tp/parsetexi/separator.c 2016-04-24 09:43:26 UTC (rev 7125)
+++ trunk/tp/parsetexi/separator.c 2016-04-24 10:30:48 UTC (rev 7126)
@@ -349,6 +349,8 @@
debug ("FOR PARENT ... command_as_argument_braces ...");
if (!current->parent->type)
current->parent->type = ET_command_as_argument;
+ add_extra_element (current->parent->parent->parent,
+ "command_as_argument", current->parent);
}
//register_global_command ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7126] parsetexi update,
Gavin D. Smith <=