mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-08 15:20:36 +02:00
A3
- Removed obsolete ::infix method.
This commit is contained in:
parent
87a48ab7f5
commit
1a75039cf7
2 changed files with 0 additions and 35 deletions
34
src/A3.cpp
34
src/A3.cpp
|
@ -759,40 +759,6 @@ const A3 A3::tokenize (const A3& input) const
|
|||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Insert 'and' operators between adjacent non-operators.
|
||||
//
|
||||
// ) <non-op> --> ) and <non-op>
|
||||
// <non-op> ( --> <non-op> <and> (
|
||||
// ) ( --> ) and (
|
||||
// <non-op> <non-op> --> <non-op> and <non-op>
|
||||
//
|
||||
const A3 A3::infix (const A3& input) const
|
||||
{
|
||||
if (input.size () == 1)
|
||||
return input;
|
||||
|
||||
Arg previous ("?", Arg::cat_op);
|
||||
A3 modified;
|
||||
std::vector <Arg>::const_iterator arg;
|
||||
for (arg = input.begin (); arg != input.end (); ++arg)
|
||||
{
|
||||
// Old-style filters need 'and' conjunctions.
|
||||
if ((previous._category != Arg::cat_op || previous._raw == ")") &&
|
||||
(arg->_category != Arg::cat_op || arg->_raw == "("))
|
||||
{
|
||||
modified.push_back (Arg ("and", Arg::cat_op));
|
||||
}
|
||||
|
||||
// Now insert the adjacent non-operator.
|
||||
modified.push_back (*arg);
|
||||
previous = *arg;
|
||||
}
|
||||
|
||||
modified.dump ("A3::infix");
|
||||
return modified;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const A3 A3::expand (const A3& input) const
|
||||
{
|
||||
|
|
1
src/A3.h
1
src/A3.h
|
@ -62,7 +62,6 @@ public:
|
|||
const A3 extract_modifications () const;
|
||||
|
||||
const A3 tokenize (const A3&) const;
|
||||
const A3 infix (const A3&) const;
|
||||
const A3 expand (const A3&) const;
|
||||
const A3 sequence (const A3&) const;
|
||||
const A3 postfix (const A3&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue