]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Merge branch 'staging'
authorLuca Bruno <lucabru@src.gnome.org>
Mon, 21 Oct 2013 18:10:03 +0000 (20:10 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 21 Oct 2013 18:10:03 +0000 (20:10 +0200)
Conflicts:
vala/valagirparser.vala

1  2 
vala/valagirparser.vala

index 5fab592a8de34f6fd221dc074045085b4d1e1d25,e6857067e3ab348e1d52bce0c9e07bc20ca6f847..4f130ce0a3f99c0ab300fac533fa7eb6fa0f3cf9
@@@ -2053,21 -2059,25 +2057,29 @@@ public class Vala.GirParser : CodeVisit
        }
  
        Comment? parse_doc () {
-               if (reader.name != "doc") {
-                       return null;
-               }
 -              skip_other_docs ();
++              Comment? comment = null;
  
-               start_element ("doc");
-               next ();
 -              if (reader.name != "doc") {
 -                      return null;
 -              }
++              while (current_token == MarkupTokenType.START_ELEMENT) {
++                      unowned string reader_name = reader.name;
  
-               Comment? comment = null;
 -              start_element ("doc");
 -              next ();
++                      if (reader_name == "doc") {
++                              start_element ("doc");
++                              next ();
  
-               if (current_token == MarkupTokenType.TEXT) {
-                       comment = new Comment (reader.content, current.source_reference);
-                       next ();
 -              Comment? comment = null;
 -              if (current_token == MarkupTokenType.TEXT) {
 -                      comment = new Comment (reader.content, current.source_reference);
 -                      next ();
 -              }
++                              if (current_token == MarkupTokenType.TEXT) {
++                                      comment = new Comment (reader.content, current.source_reference);
++                                      next ();
++                              }
 -              end_element ("doc");
++                              end_element ("doc");
++                      } else if (reader_name == "doc-version" || reader_name == "doc-deprecated" || reader_name == "doc-stability") {
++                              skip_element ();
++                      } else {
++                              break;
++                      }
 +              }
  
-               end_element ("doc");
 -              skip_other_docs ();
                return comment;
        }