mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI2: Removed references to PSEUDO args, now they are demoted to config settings
This commit is contained in:
parent
84b3055690
commit
360071712f
1 changed files with 2 additions and 15 deletions
17
src/CLI2.cpp
17
src/CLI2.cpp
|
@ -233,7 +233,6 @@ const std::string A2::dump () const
|
||||||
else if (tag == "MISCELLANEOUS") tags += "\033[1;37;45m" + tag + "\033[0m";
|
else if (tag == "MISCELLANEOUS") tags += "\033[1;37;45m" + tag + "\033[0m";
|
||||||
else if (tag == "RC") tags += "\033[1;37;41m" + tag + "\033[0m";
|
else if (tag == "RC") tags += "\033[1;37;41m" + tag + "\033[0m";
|
||||||
else if (tag == "CONFIG") tags += "\033[1;37;101m" + tag + "\033[0m";
|
else if (tag == "CONFIG") tags += "\033[1;37;101m" + tag + "\033[0m";
|
||||||
else if (tag == "PSEUDO") tags += "\033[1;37;45m" + tag + "\033[0m";
|
|
||||||
else if (tag == "?") tags += "\033[38;5;255;48;5;232m" + tag + "\033[0m";
|
else if (tag == "?") tags += "\033[38;5;255;48;5;232m" + tag + "\033[0m";
|
||||||
else tags += "\033[32m" + tag + "\033[0m";
|
else tags += "\033[32m" + tag + "\033[0m";
|
||||||
}
|
}
|
||||||
|
@ -1274,17 +1273,7 @@ void CLI2::desugarFilterAttributes ()
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
std::string canonical;
|
std::string canonical;
|
||||||
if (canonicalize (canonical, "pseudo", name))
|
if (canonicalize (canonical, "attribute", name))
|
||||||
{
|
|
||||||
// No eval.
|
|
||||||
A2 lhs (raw, Lexer::Type::identifier);
|
|
||||||
lhs.attribute ("canonical", canonical);
|
|
||||||
lhs.attribute ("value", value);
|
|
||||||
lhs.tag ("PSEUDO");
|
|
||||||
reconstructed.push_back (lhs);
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
else if (canonicalize (canonical, "attribute", name))
|
|
||||||
{
|
{
|
||||||
// Certain attribute types do not suport math.
|
// Certain attribute types do not suport math.
|
||||||
// string --> no
|
// string --> no
|
||||||
|
@ -1903,7 +1892,6 @@ void CLI2::desugarFilterPlainArgs ()
|
||||||
prev->_lextype == Lexer::Type::word) && // candidate
|
prev->_lextype == Lexer::Type::word) && // candidate
|
||||||
|
|
||||||
prev->hasTag ("FILTER") && // candidate
|
prev->hasTag ("FILTER") && // candidate
|
||||||
! prev->hasTag ("PSEUDO") && // non-candidate
|
|
||||||
|
|
||||||
(a._lextype != Lexer::Type::op || // argY
|
(a._lextype != Lexer::Type::op || // argY
|
||||||
raw == "(" ||
|
raw == "(" ||
|
||||||
|
@ -1933,8 +1921,7 @@ void CLI2::desugarFilterPlainArgs ()
|
||||||
(last._lextype == Lexer::Type::identifier || // candidate
|
(last._lextype == Lexer::Type::identifier || // candidate
|
||||||
last._lextype == Lexer::Type::word) && // candidate
|
last._lextype == Lexer::Type::word) && // candidate
|
||||||
|
|
||||||
last.hasTag ("FILTER") && // candidate
|
last.hasTag ("FILTER")) // candidate
|
||||||
! last.hasTag ("PSEUDO")) // non-candidate
|
|
||||||
{
|
{
|
||||||
last.tag ("PLAIN");
|
last.tag ("PLAIN");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue