mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser
- ::findAttribute now repeats without breaking the iterator.
This commit is contained in:
parent
63808b8920
commit
37614ac6b3
1 changed files with 70 additions and 64 deletions
|
@ -25,7 +25,6 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
#include <iostream> // TODO Remove.
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -964,7 +963,11 @@ void Parser::findTag ()
|
||||||
void Parser::findAttribute ()
|
void Parser::findAttribute ()
|
||||||
{
|
{
|
||||||
context.debug ("Parser::findAttribute");
|
context.debug ("Parser::findAttribute");
|
||||||
bool action = false;
|
bool action = true;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
action = false;
|
||||||
|
|
||||||
std::vector <Tree*> nodes;
|
std::vector <Tree*> nodes;
|
||||||
collect (nodes);
|
collect (nodes);
|
||||||
|
@ -1006,6 +1009,7 @@ void Parser::findAttribute ()
|
||||||
(*i)->attribute ("name", canonical);
|
(*i)->attribute ("name", canonical);
|
||||||
(*i)->attribute ("raw", value);
|
(*i)->attribute ("raw", value);
|
||||||
action = true;
|
action = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (canonicalize (canonical, "attribute", name))
|
else if (canonicalize (canonical, "attribute", name))
|
||||||
|
@ -1040,13 +1044,15 @@ void Parser::findAttribute ()
|
||||||
branch = (*i)->addBranch (new Tree ("argAtt"));
|
branch = (*i)->addBranch (new Tree ("argAtt"));
|
||||||
branch->attribute ("raw", value);
|
branch->attribute ("raw", value);
|
||||||
action = true;
|
action = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
while (action);
|
||||||
|
|
||||||
if (action)
|
|
||||||
context.debug (_tree->dump ());
|
context.debug (_tree->dump ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue