mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI2: ::desugarFilterAttributes now relies on earlier parsing
This commit is contained in:
parent
3f3d698a28
commit
29d6eceda1
1 changed files with 130 additions and 134 deletions
16
src/CLI2.cpp
16
src/CLI2.cpp
|
@ -1061,12 +1061,11 @@ void CLI2::desugarFilterAttributes ()
|
|||
a.hasTag ("FILTER"))
|
||||
{
|
||||
std::string raw = a.attribute ("raw");
|
||||
std::string name;
|
||||
std::string mod;
|
||||
std::string sep;
|
||||
std::string value;
|
||||
if (Lexer::decomposePair (raw, name, mod, sep, value))
|
||||
{
|
||||
std::string name = a.attribute ("name");
|
||||
std::string mod = a.attribute ("modifier");
|
||||
std::string sep = a.attribute ("separator");
|
||||
std::string value = a.attribute ("value");
|
||||
|
||||
if (value == "")
|
||||
value = "''";
|
||||
|
||||
|
@ -1183,6 +1182,7 @@ void CLI2::desugarFilterAttributes ()
|
|||
reconstructed.push_back (rhs);
|
||||
found = true;
|
||||
}
|
||||
|
||||
// If the name does not canonicalize to either an attribute or a UDA
|
||||
// then it is not a recognized Lexer::Type::pair, so downgrade it to
|
||||
// Lexer::Type::word.
|
||||
|
@ -1196,10 +1196,6 @@ void CLI2::desugarFilterAttributes ()
|
|||
else
|
||||
reconstructed.push_back (a);
|
||||
}
|
||||
// Failed to decompose.
|
||||
else
|
||||
reconstructed.push_back (a);
|
||||
}
|
||||
// Not a FILTER pair.
|
||||
else
|
||||
reconstructed.push_back (a);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue