]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: be a bit more forgiving about unexpected elements in a GIR
authorEvan Nemerson <evan@coeus-group.com>
Mon, 11 Feb 2013 21:04:31 +0000 (13:04 -0800)
committerEvan Nemerson <evan@coeus-group.com>
Mon, 11 Feb 2013 21:04:31 +0000 (13:04 -0800)
vala/valagirparser.vala

index 8256ef29c0e79619d9277d01c36a24017b0d8bc9..0af275cdfb50c3ea725e1fd364d776e82d0a6b24 100644 (file)
@@ -1233,9 +1233,9 @@ public class Vala.GirParser : CodeVisitor {
        }
 
        void end_element (string name) {
-               if (current_token != MarkupTokenType.END_ELEMENT || reader.name != name) {
-                       // error
-                       Report.error (get_current_src (), "expected end element of `%s'".printf (name));
+               while (current_token != MarkupTokenType.END_ELEMENT || reader.name != name) {
+                       Report.warning (get_current_src (), "expected end element of `%s'".printf (name));
+                       skip_element ();
                }
                next ();
        }