mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- Removed now-unused ::scan method, as this is no longer used.
This commit is contained in:
parent
ca3b5c9a4d
commit
2018eae295
2 changed files with 0 additions and 32 deletions
|
@ -307,37 +307,6 @@ void Parser::collect (std::vector <Tree*>& nodes, bool all, Tree* tree /* = NULL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Recursively scan all nodes, depth first, skipping terminated nodes, and known
|
|
||||||
// nodes, and cal the callback function for each node.
|
|
||||||
void Parser::scan (void (Parser::*callback) (Tree*), Tree* tree /* = NULL */)
|
|
||||||
{
|
|
||||||
if (tree == NULL)
|
|
||||||
tree = _tree;
|
|
||||||
|
|
||||||
std::vector <Tree*>::iterator i;
|
|
||||||
for (i = tree->_branches.begin (); i != tree->_branches.end (); ++i)
|
|
||||||
{
|
|
||||||
if ((*i)->_branches.size ())
|
|
||||||
{
|
|
||||||
scan (callback, *i);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Parser override operator.
|
|
||||||
if ((*i)->hasTag ("TERMINATOR") ||
|
|
||||||
(*i)->hasTag ("TERMINATED"))
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Skip known args.
|
|
||||||
if (! (*i)->hasTag ("?"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
(this->*callback) (*i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Locate and tag the binary. It is assumed that the binary is the first
|
// Locate and tag the binary. It is assumed that the binary is the first
|
||||||
// argument, which is valid.
|
// argument, which is valid.
|
||||||
|
|
|
@ -70,7 +70,6 @@ public:
|
||||||
std::string getCommand () const;
|
std::string getCommand () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void scan (void (Parser::*callback)(Tree*), Tree* tree = NULL);
|
|
||||||
void findTerminator ();
|
void findTerminator ();
|
||||||
void findPattern ();
|
void findPattern ();
|
||||||
void findSubstitution ();
|
void findSubstitution ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue