mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Expression reboot
- Downgraded A3::extract_words to return a simple vector of strings. Any more is unnecessary.
This commit is contained in:
parent
b30b187b4c
commit
67fb1e9be4
3 changed files with 5 additions and 8 deletions
|
@ -574,13 +574,13 @@ const A3 A3::extract_modifications () const
|
||||||
mods.push_back (*arg);
|
mods.push_back (*arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mods;
|
return tokenize (mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const A3 A3::extract_words () const
|
const std::vector <std::string> A3::extract_words () const
|
||||||
{
|
{
|
||||||
A3 words;
|
std::vector <std::string> words;
|
||||||
std::vector <Arg>::const_iterator arg;
|
std::vector <Arg>::const_iterator arg;
|
||||||
for (arg = this->begin (); arg != this->end (); ++arg)
|
for (arg = this->begin (); arg != this->end (); ++arg)
|
||||||
{
|
{
|
||||||
|
@ -592,7 +592,7 @@ const A3 A3::extract_words () const
|
||||||
;
|
;
|
||||||
|
|
||||||
else
|
else
|
||||||
words.push_back (*arg);
|
words.push_back (arg->_raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
return words;
|
return words;
|
||||||
|
|
2
src/A3.h
2
src/A3.h
|
@ -101,7 +101,7 @@ public:
|
||||||
|
|
||||||
const A3 extract_filter () const;
|
const A3 extract_filter () const;
|
||||||
const A3 extract_modifications () const;
|
const A3 extract_modifications () const;
|
||||||
const A3 extract_words () const;
|
const std::vector <std::string> extract_words () const;
|
||||||
|
|
||||||
const A3 tokenize (const A3&) const;
|
const A3 tokenize (const A3&) const;
|
||||||
|
|
||||||
|
|
|
@ -304,9 +304,6 @@ void Command::filter (std::vector <Task>& output)
|
||||||
|
|
||||||
A3 mods = context.a3.extract_modifications ();
|
A3 mods = context.a3.extract_modifications ();
|
||||||
mods.dump ("extract_modifications");
|
mods.dump ("extract_modifications");
|
||||||
|
|
||||||
A3 words = context.a3.extract_words ();
|
|
||||||
words.dump ("extract_words");
|
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
Arguments f;
|
Arguments f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue