[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7855] parsetexi associated_part
From: |
gavinsmith0123 |
Subject: |
[7855] parsetexi associated_part |
Date: |
Sun, 25 Jun 2017 12:15:24 -0400 (EDT) |
Revision: 7855
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7855
Author: gavin
Date: 2017-06-25 12:15:24 -0400 (Sun, 25 Jun 2017)
Log Message:
-----------
parsetexi associated_part
Modified Paths:
--------------
trunk/tp/parsetexi/api.c
trunk/tp/parsetexi/end_line.c
trunk/tp/parsetexi/parser.c
trunk/tp/parsetexi/parser.h
Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c 2017-06-25 15:49:25 UTC (rev 7854)
+++ trunk/tp/parsetexi/api.c 2017-06-25 16:15:24 UTC (rev 7855)
@@ -61,7 +61,7 @@
input_reset_input_stack ();
reset_conf ();
- current_node = current_section = 0;
+ current_node = current_section = current_part = 0;
}
/* Set ROOT to root of tree obtained by parsing FILENAME. */
Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c 2017-06-25 15:49:25 UTC (rev 7854)
+++ trunk/tp/parsetexi/end_line.c 2017-06-25 16:15:24 UTC (rev 7855)
@@ -1978,9 +1978,31 @@
}
// "current parts" - 3394
+ if (current_part)
+ {
+ add_extra_element (current, "associated_part", current_part);
+ add_extra_element (current_part, "part_associated_section",
+ current);
+ if (current->cmd == CM_top)
+ {
+ line_error_ext (1, ¤t_part->line_nr,
+ "@part should not be associated with @top");
+ }
+ current_part = 0;
+ }
current_section = current;
}
+ else if (cmd == CM_part)
+ {
+ current_part = current;
+ if (current_node
+ && !lookup_extra_key (current_node, "associated_section"))
+ {
+ line_warn ("@node precedes @part, but parts may not be "
+ "associated with nodes");
+ }
+ }
} /* 3416 */
return current;
Modified: trunk/tp/parsetexi/parser.c
===================================================================
--- trunk/tp/parsetexi/parser.c 2017-06-25 15:49:25 UTC (rev 7854)
+++ trunk/tp/parsetexi/parser.c 2017-06-25 16:15:24 UTC (rev 7855)
@@ -67,10 +67,11 @@
}
-/* Current node and section. */
+/* Current node, section and part. */
ELEMENT *current_node = 0;
ELEMENT *current_section = 0;
+ELEMENT *current_part = 0;
/* Conditional stack. */
Modified: trunk/tp/parsetexi/parser.h
===================================================================
--- trunk/tp/parsetexi/parser.h 2017-06-25 15:49:25 UTC (rev 7854)
+++ trunk/tp/parsetexi/parser.h 2017-06-25 16:15:24 UTC (rev 7855)
@@ -80,6 +80,7 @@
extern ELEMENT *current_node;
extern ELEMENT *current_section;
+extern ELEMENT *current_part;
extern GLOBAL_INFO global_info;
extern char *global_clickstyle;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7855] parsetexi associated_part,
gavinsmith0123 <=