From: Evan Nemerson Date: Wed, 13 Feb 2013 09:27:10 +0000 (-0800) Subject: girparser: skip doc-version, -deprecated, and -stability X-Git-Tag: 0.22.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a739543513ad90b067e9cf5efc51b973e31ca436;p=thirdparty%2Fvala.git girparser: skip doc-version, -deprecated, and -stability These element aren't in GObject Introspection yet, but should be coming soon. Since we don't want to parse the docbook we'll just skip them instead of tryin to add the information to the VAPI. --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 8413e9ebc..4fb2e9a4b 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -2026,21 +2026,29 @@ public class Vala.GirParser : CodeVisitor { } GirComment? parse_symbol_doc () { - if (reader.name != "doc") { - return null; - } + GirComment? comment = null; - start_element ("doc"); - next (); + while (current_token == MarkupTokenType.START_ELEMENT) { + unowned string reader_name = reader.name; - GirComment? comment = null; + if (reader_name == "doc") { + start_element ("doc"); + next (); - if (current_token == MarkupTokenType.TEXT) { - comment = new GirComment (reader.content, current.source_reference); - next (); + + if (current_token == MarkupTokenType.TEXT) { + comment = new GirComment (reader.content, current.source_reference); + next (); + } + + end_element ("doc"); + } else if (reader_name == "doc-version" || reader_name == "doc-deprecated" || reader_name == "doc-stability") { + skip_element (); + } else { + break; + } } - end_element ("doc"); return comment; }