mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
A3t
- Implemented A3t::getWords, to replace A3::extract_words.
This commit is contained in:
parent
b01906cd62
commit
1d298c9068
2 changed files with 19 additions and 2 deletions
18
src/A3t.cpp
18
src/A3t.cpp
|
@ -584,6 +584,24 @@ const std::string A3t::getFilterExpression () const
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
const std::vector <std::string> A3t::getWords () const
|
||||||
|
{
|
||||||
|
std::vector <std::string> words;
|
||||||
|
std::vector <Tree*>::const_iterator i;
|
||||||
|
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||||
|
{
|
||||||
|
if (! (*i)->hasTag ("BINARY") &&
|
||||||
|
! (*i)->hasTag ("RC") &&
|
||||||
|
! (*i)->hasTag ("CONFIG") &&
|
||||||
|
! (*i)->hasTag ("CMD") &&
|
||||||
|
! (*i)->hasTag ("TERMINATOR"))
|
||||||
|
words.push_back ((*i)->attribute ("raw"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return words;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// /pattern/
|
// /pattern/
|
||||||
void A3t::findPattern ()
|
void A3t::findPattern ()
|
||||||
|
|
|
@ -57,8 +57,7 @@ public:
|
||||||
Tree* captureFirst (const std::string&);
|
Tree* captureFirst (const std::string&);
|
||||||
|
|
||||||
const std::string getFilterExpression () const;
|
const std::string getFilterExpression () const;
|
||||||
|
const std::vector <std::string> getWords () const;
|
||||||
// TODO Extract words
|
|
||||||
// TODO Extract modifications
|
// TODO Extract modifications
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue