Parser
- ::findAttribute now repeats without breaking the iterator.
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream> // TODO Remove.
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@@ -964,7 +963,11 @@ void Parser::findTag ()
|
||||
void Parser::findAttribute ()
|
||||
{
|
||||
context.debug ("Parser::findAttribute");
|
||||
bool action = false;
|
||||
bool action = true;
|
||||
|
||||
do
|
||||
{
|
||||
action = false;
|
||||
|
||||
std::vector <Tree*> nodes;
|
||||
collect (nodes);
|
||||
@@ -1006,6 +1009,7 @@ void Parser::findAttribute ()
|
||||
(*i)->attribute ("name", canonical);
|
||||
(*i)->attribute ("raw", value);
|
||||
action = true;
|
||||
break;
|
||||
}
|
||||
|
||||
else if (canonicalize (canonical, "attribute", name))
|
||||
@@ -1040,13 +1044,15 @@ void Parser::findAttribute ()
|
||||
branch = (*i)->addBranch (new Tree ("argAtt"));
|
||||
branch->attribute ("raw", value);
|
||||
action = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (action);
|
||||
|
||||
if (action)
|
||||
context.debug (_tree->dump ());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user