mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
A3
- Removed obsolete ::extract_modifications method.
This commit is contained in:
parent
fb639496d3
commit
e7d733881a
2 changed files with 0 additions and 48 deletions
46
src/A3.cpp
46
src/A3.cpp
|
@ -520,52 +520,6 @@ const std::vector <std::string> A3::operator_list ()
|
||||||
return all;
|
return all;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
const A3 A3::extract_modifications () const
|
|
||||||
{
|
|
||||||
A3 mods;
|
|
||||||
|
|
||||||
bool before_command = true;
|
|
||||||
std::vector <Arg>::const_iterator arg;
|
|
||||||
for (arg = this->begin (); arg != this->end (); ++arg)
|
|
||||||
{
|
|
||||||
if (arg->_category == Arg::cat_command)
|
|
||||||
before_command = false;
|
|
||||||
|
|
||||||
else if (! before_command)
|
|
||||||
{
|
|
||||||
// rc and override categories are not included.
|
|
||||||
if (arg->_category == Arg::cat_rc ||
|
|
||||||
arg->_category == Arg::cat_override)
|
|
||||||
{
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Any arguments identified as "id" or "uuid" are downgraded to "word".
|
|
||||||
// This is because any true "id" or "uuid" values have already been
|
|
||||||
// removed in the filter. What remains are numeric arguments in command
|
|
||||||
// lines that do not otherwise include an id, such as:
|
|
||||||
//
|
|
||||||
// task add Read the article on page 2
|
|
||||||
else if (arg->_category == Arg::cat_id ||
|
|
||||||
arg->_category == Arg::cat_uuid)
|
|
||||||
{
|
|
||||||
Arg downgrade (*arg);
|
|
||||||
downgrade._type = Arg::type_string;
|
|
||||||
downgrade._category = Arg::cat_literal;
|
|
||||||
mods.push_back (downgrade);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Everything else is included.
|
|
||||||
else
|
|
||||||
mods.push_back (*arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mods = tokenize (mods);
|
|
||||||
return mods;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const A3 A3::tokenize (const A3& input) const
|
const A3 A3::tokenize (const A3& input) const
|
||||||
{
|
{
|
||||||
|
|
2
src/A3.h
2
src/A3.h
|
@ -58,8 +58,6 @@ public:
|
||||||
const std::vector <std::string> list () const;
|
const std::vector <std::string> list () const;
|
||||||
bool find_command (std::string&) const;
|
bool find_command (std::string&) const;
|
||||||
|
|
||||||
const A3 extract_modifications () const;
|
|
||||||
|
|
||||||
const A3 tokenize (const A3&) const;
|
const A3 tokenize (const A3&) const;
|
||||||
const A3 postfix (const A3&) const;
|
const A3 postfix (const A3&) const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue