[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6821] parsetexi update
From: |
Gavin D. Smith |
Subject: |
[6821] parsetexi update |
Date: |
Tue, 01 Dec 2015 13:27:18 +0000 |
Revision: 6821
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6821
Author: gavin
Date: 2015-12-01 13:27:15 +0000 (Tue, 01 Dec 2015)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/parsetexi/end_line.c
trunk/parsetexi/handle_commands.c
trunk/parsetexi/parser.c
trunk/parsetexi/parser.h
Modified: trunk/parsetexi/end_line.c
===================================================================
--- trunk/parsetexi/end_line.c 2015-12-01 12:05:09 UTC (rev 6820)
+++ trunk/parsetexi/end_line.c 2015-12-01 13:27:15 UTC (rev 6821)
@@ -1141,6 +1141,9 @@
}
else
{
+ // FIXME: end_elt correct?
+ add_extra_key_element (end_elt, "command", closed_command);
+ add_extra_key_element (closed_command, "end_command", end_elt);
close_command_cleanup (closed_command);
// 3301 INLINE_INSERTCOPYING
add_to_element_contents (closed_command, end_elt); // 3321
Modified: trunk/parsetexi/handle_commands.c
===================================================================
--- trunk/parsetexi/handle_commands.c 2015-12-01 12:05:09 UTC (rev 6820)
+++ trunk/parsetexi/handle_commands.c 2015-12-01 13:27:15 UTC (rev 6821)
@@ -414,7 +414,7 @@
if (!(command_data(cmd).flags & CF_def))
push_context (ct_line);
}
- start_empty_line_after_command (current, &line); //4621
+ start_empty_line_after_command (current, &line, misc); //4621
}
/* line 4622 */
@@ -506,6 +506,7 @@
}
else /* line 4710 */
{
+ ELEMENT *block = 0;
// 4715
if (flags & CF_menu
&& (current->type == ET_menu_comment
@@ -530,7 +531,7 @@
// 4740
if (flags & CF_def)
{
- ELEMENT *block, *def_line;
+ ELEMENT *def_line;
push_context (ct_def);
block = new_element (ET_NONE);
block->cmd = cmd;
@@ -548,7 +549,7 @@
else
{
/* line 4756 */
- ELEMENT *block = new_element (ET_NONE);
+ block = new_element (ET_NONE);
block->cmd = cmd;
block->line_nr = line_nr;
@@ -616,7 +617,7 @@
} /* 4827 */
// mark_and_warn_invalid ();
// register_global_command ();
- start_empty_line_after_command (current, &line);
+ start_empty_line_after_command (current, &line, block);
}
funexit:
Modified: trunk/parsetexi/parser.c
===================================================================
--- trunk/parsetexi/parser.c 2015-12-01 12:05:09 UTC (rev 6820)
+++ trunk/parsetexi/parser.c 2015-12-01 13:27:15 UTC (rev 6821)
@@ -530,7 +530,8 @@
text follows on the line. Used after line commmands or commands starting
a block. */
void
-start_empty_line_after_command (ELEMENT *current, char **line_inout)
+start_empty_line_after_command (ELEMENT *current, char **line_inout,
+ ELEMENT *command)
{
char *line = *line_inout;
ELEMENT *e;
@@ -542,6 +543,12 @@
text_append_n (&e->text, line, len);
line += len;
+ if (command)
+ {
+ add_extra_key_element (e, "command", command);
+ add_extra_key_element (command, "spaces_after_command", e);
+ }
+
*line_inout = line;
}
@@ -688,7 +695,7 @@
else
{
debug ("CLOSED raw %s", command_name(end_cmd));
- start_empty_line_after_command (current, &line); // 3831
+ start_empty_line_after_command (current, &line, 0); // 3831
}
}
else /* 3833 save the line verbatim */
@@ -1146,8 +1153,8 @@
element type can be changed in 'abort_empty_line' when more text is
read. */
if (!((command_flags(current) & CF_block)
- && (command_data(current->cmd).data != BLOCK_raw
- || command_data(current->cmd).data != BLOCK_conditional)
+ && (command_data(current->cmd).data == BLOCK_raw
+ || command_data(current->cmd).data == BLOCK_conditional)
|| current->parent && current->parent->cmd == CM_verb))
{
ELEMENT *e;
Modified: trunk/parsetexi/parser.h
===================================================================
--- trunk/parsetexi/parser.h 2015-12-01 12:05:09 UTC (rev 6820)
+++ trunk/parsetexi/parser.h 2015-12-01 13:27:15 UTC (rev 6821)
@@ -45,7 +45,8 @@
ELEMENT *end_preformatted (ELEMENT *current);
char *read_command_name (char **ptr);
ELEMENT *merge_text (ELEMENT *current, char *text);
-void start_empty_line_after_command (ELEMENT *current, char **line_inout);
+void start_empty_line_after_command (ELEMENT *current, char **line_inout,
+ ELEMENT *command);
ELEMENT *trim_spaces_comment_from_content (ELEMENT *original);
extern const char *whitespace_chars, *whitespace_chars_except_newline;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6821] parsetexi update,
Gavin D. Smith <=