handle comments while parsing, instead of returning them to the user
authorRoyce Mitchell III <royce3@ev1.net>
Wed, 5 Jan 2005 03:47:55 +0000 (03:47 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Wed, 5 Jan 2005 03:47:55 +0000 (03:47 +0000)
svn path=/branches/xmlbuildsystem/; revision=12816

reactos/tools/rbuild/XML.cpp
reactos/tools/rbuild/project.cpp

index 26b25c3..f3317a2 100644 (file)
@@ -445,9 +445,10 @@ XMLParse(XMLFile& f,
                return NULL;\r
        bool end_tag;\r
 \r
-       while ( token[0] != '<' )\r
+       while ( token[0] != '<' || !strncmp ( token.c_str(), "<!--", 4 ) )\r
        {\r
-               printf ( "syntax error: expecting xml tag, not '%s'\n", token.c_str() );\r
+               if ( token[0] != '<' )\r
+                       printf ( "syntax error: expecting xml tag, not '%s'\n", token.c_str() );\r
                if ( !f.get_token(token) )\r
                        return NULL;\r
        }\r
index 9def258..dc56ee9 100644 (file)
@@ -34,9 +34,6 @@ void Project::ReadXml()
                if ( !head )\r
                        throw InvalidBuildFileException ( "Document contains no 'project' tag." );\r
 \r
-               if ( head->name == "!--" )\r
-                       continue; // ignore comments\r
-\r
                if ( head->name != "project" )\r
                {\r
                        throw InvalidBuildFileException ( "Expected 'project', got '%s'.",\r