mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:23:01 +00:00
handle comments while parsing, instead of returning them to the user
svn path=/branches/xmlbuildsystem/; revision=12816
This commit is contained in:
parent
0b755662dd
commit
4ee64fd1b7
2 changed files with 3 additions and 5 deletions
|
@ -445,8 +445,9 @@ XMLParse(XMLFile& f,
|
||||||
return NULL;
|
return NULL;
|
||||||
bool end_tag;
|
bool end_tag;
|
||||||
|
|
||||||
while ( token[0] != '<' )
|
while ( token[0] != '<' || !strncmp ( token.c_str(), "<!--", 4 ) )
|
||||||
{
|
{
|
||||||
|
if ( token[0] != '<' )
|
||||||
printf ( "syntax error: expecting xml tag, not '%s'\n", token.c_str() );
|
printf ( "syntax error: expecting xml tag, not '%s'\n", token.c_str() );
|
||||||
if ( !f.get_token(token) )
|
if ( !f.get_token(token) )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -34,9 +34,6 @@ void Project::ReadXml()
|
||||||
if ( !head )
|
if ( !head )
|
||||||
throw InvalidBuildFileException ( "Document contains no 'project' tag." );
|
throw InvalidBuildFileException ( "Document contains no 'project' tag." );
|
||||||
|
|
||||||
if ( head->name == "!--" )
|
|
||||||
continue; // ignore comments
|
|
||||||
|
|
||||||
if ( head->name != "project" )
|
if ( head->name != "project" )
|
||||||
{
|
{
|
||||||
throw InvalidBuildFileException ( "Expected 'project', got '%s'.",
|
throw InvalidBuildFileException ( "Expected 'project', got '%s'.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue