]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gtkdoc-parser: Fix possible infinite loop
authorFlorian Brosch <flo.brosch@gmail.com>
Mon, 30 Jan 2012 01:42:23 +0000 (02:42 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Mon, 30 Jan 2012 01:44:53 +0000 (02:44 +0100)
src/libvaladoc/documentation/gtkdoccommentparser.vala

index d73003aafceeb45101558ea53890eedae333c1eb..36544c08c834ecb988fb04eb6bfc8c9db59351bc 100644 (file)
@@ -548,9 +548,7 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
 
                ListItem item = factory.create_list_item ();
        
-               while (current.type != TokenType.XML_CLOSE && current.type != TokenType.EOF) {
-                       item.content.add_all (parse_mixed_content ());
-               }
+               item.content.add_all (parse_mixed_content ());
 
                if (!check_xml_close_tag ("listitem")) {
                        this.report_unexpected_token (current, "</listitem>");
@@ -626,6 +624,12 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
                Content.List list = factory.create_list ();
                list.bullet = bullet_type;
 
+//             if (current.type == TokenType.XML_OPEN && current.content == "title") {
+                       // TODO
+//                     parse_docbook_title ();
+//                     parse_docbook_spaces ();
+//             }
+
                while (current.type == TokenType.XML_OPEN) {
                        if (current.content == "listitem") {
                                list.items.add (parse_docbook_listitem ());