mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-03 07:07:19 +02:00
Parser
- Modified ::findOverrides to use collect.
This commit is contained in:
parent
f1a61aaeb6
commit
4645bbc85d
1 changed files with 7 additions and 9 deletions
|
@ -505,17 +505,13 @@ void Parser::findCommand ()
|
||||||
// rc.<name>[:=]<value>
|
// rc.<name>[:=]<value>
|
||||||
void Parser::findOverrides ()
|
void Parser::findOverrides ()
|
||||||
{
|
{
|
||||||
|
context.debug ("Parse::findOverrides");
|
||||||
|
|
||||||
|
std::vector <Tree*> nodes;
|
||||||
|
collect (nodes, false);
|
||||||
std::vector <Tree*>::iterator i;
|
std::vector <Tree*>::iterator i;
|
||||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||||
{
|
{
|
||||||
// Parser override operator.
|
|
||||||
if ((*i)->attribute ("raw") == "--")
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Skip known args.
|
|
||||||
if (! (*i)->hasTag ("?"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
std::string arg = (*i)->attribute ("raw");
|
std::string arg = (*i)->attribute ("raw");
|
||||||
if (arg.find ("rc:") == 0)
|
if (arg.find ("rc:") == 0)
|
||||||
{
|
{
|
||||||
|
@ -540,6 +536,8 @@ void Parser::findOverrides ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.debug (_tree->dump ());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue