[valadoc] gtkdoc-importer: Add support for sections
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] gtkdoc-importer: Add support for sections
- Date: Mon, 30 Jan 2012 02:58:54 +0000 (UTC)
commit 5ab247e291e7cf872be19b8141b7fe85af866d48
Author: Florian Brosch <flo brosch gmail com>
Date: Sun Jan 29 20:32:00 2012 +0100
gtkdoc-importer: Add support for sections
.../documentation/gtkdoccommentparser.vala | 32 +++++++++++++-------
1 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/src/libvaladoc/documentation/gtkdoccommentparser.vala b/src/libvaladoc/documentation/gtkdoccommentparser.vala
index a437a66..a91e1f5 100644
--- a/src/libvaladoc/documentation/gtkdoccommentparser.vala
+++ b/src/libvaladoc/documentation/gtkdoccommentparser.vala
@@ -882,12 +882,6 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
LinkedList<Block> content = new LinkedList<Block> ();
- if (current.type == TokenType.XML_OPEN && current.content == "title") {
- append_block_content_not_null (content, parse_docbook_title ());
- parse_docbook_spaces ();
- }
-
-
content.add_all (parse_mixed_content ());
/*
@@ -932,11 +926,6 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
LinkedList<Block> content = new LinkedList<Block> ();
- if (current.type == TokenType.XML_OPEN && current.content == "title") {
- append_block_content_not_null (content, parse_docbook_title ());
- parse_docbook_spaces ();
- }
-
this.append_block_content_not_null_all (content, parse_mixed_content ());
if (!check_xml_close_tag ("refsect2")) {
@@ -1196,6 +1185,23 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
return table;
}
+ private LinkedList<Block> parse_docbook_section () {
+ if (!check_xml_open_tag ("section")) {
+ }
+ string id = current.attributes.get ("id");
+ next ();
+
+ LinkedList<Block> content = parse_mixed_content ();
+
+ if (!check_xml_close_tag ("section")) {
+ this.report_unexpected_token (current, "</section>");
+ return content;
+ }
+
+ next ();
+ return content;
+ }
+
private LinkedList<Block> parse_block_content () {
LinkedList<Block> content = new LinkedList<Block> ();
@@ -1226,6 +1232,10 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
this.append_block_content_not_null_all (content, parse_docbook_refsect2 ());
} else if (current.type == TokenType.XML_OPEN && current.content == "figure") {
this.append_block_content_not_null_all (content, parse_docbook_figure ());
+ } else if (current.type == TokenType.XML_OPEN && current.content == "title") {
+ this.append_block_content_not_null (content, parse_docbook_title ());
+ } else if (current.type == TokenType.XML_OPEN && current.content == "section") {
+ this.append_block_content_not_null_all (content, parse_docbook_section ());
} else if (current.type == TokenType.GTKDOC_PARAGRAPH) {
this.append_block_content_not_null (content, parse_gtkdoc_paragraph ());
} else if (current.type == TokenType.GTKDOC_SOURCE_OPEN) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]