mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI2: Removed obsolete ::analyze method
This commit is contained in:
parent
c696a1748a
commit
3636de11c8
2 changed files with 0 additions and 83 deletions
82
src/CLI2.cpp
82
src/CLI2.cpp
|
@ -536,88 +536,6 @@ void CLI2::addRawFilter (const std::string& arg)
|
||||||
add (lexeme);
|
add (lexeme);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Intended to be called after ::initialize() and ::add(), to perform the final
|
|
||||||
// analysis. Analysis is also performed directly after the above, because there
|
|
||||||
// is a need to extract overrides early, before entities are proviedd.
|
|
||||||
void CLI2::analyze (bool parse, bool strict)
|
|
||||||
{
|
|
||||||
// Clean what needs to be cleaned. Most in this case.
|
|
||||||
_args.clear ();
|
|
||||||
_id_ranges.clear ();
|
|
||||||
_uuid_list.clear ();
|
|
||||||
|
|
||||||
// For propagation.
|
|
||||||
_strict = strict;
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < _original_args.size (); ++i)
|
|
||||||
{
|
|
||||||
std::string raw = _original_args[i];
|
|
||||||
A a ("arg", raw);
|
|
||||||
a.tag ("ORIGINAL");
|
|
||||||
|
|
||||||
if (i == 0)
|
|
||||||
{
|
|
||||||
a.tag ("BINARY");
|
|
||||||
|
|
||||||
std::string basename = "task";
|
|
||||||
auto slash = raw.rfind ('/');
|
|
||||||
if (slash != std::string::npos)
|
|
||||||
basename = raw.substr (slash + 1);
|
|
||||||
|
|
||||||
a.attribute ("basename", basename);
|
|
||||||
if (basename == "cal" || basename == "calendar")
|
|
||||||
a.tag ("CALENDAR");
|
|
||||||
else if (basename == "task" || basename == "tw" || basename == "t")
|
|
||||||
a.tag ("TW");
|
|
||||||
}
|
|
||||||
|
|
||||||
_args.push_back (a);
|
|
||||||
|
|
||||||
if (a.hasTag ("CALENDAR"))
|
|
||||||
{
|
|
||||||
A cal ("argCal", "calendar");
|
|
||||||
_args.push_back (cal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.config.getInteger ("debug.parser") >= 3)
|
|
||||||
context.debug (dump ("CLI2::analyze start"));
|
|
||||||
|
|
||||||
// Find argument types.
|
|
||||||
aliasExpansion ();
|
|
||||||
findOverrides ();
|
|
||||||
applyOverrides ();
|
|
||||||
injectDefaults ();
|
|
||||||
categorize ();
|
|
||||||
|
|
||||||
if (parse)
|
|
||||||
{
|
|
||||||
// Remove all the syntactic sugar for FILTERs.
|
|
||||||
findIDs ();
|
|
||||||
findUUIDs ();
|
|
||||||
insertIDExpr ();
|
|
||||||
desugarFilterTags ();
|
|
||||||
findStrayModifications ();
|
|
||||||
desugarFilterAttributes ();
|
|
||||||
desugarFilterAttributeModifiers ();
|
|
||||||
desugarFilterPatterns ();
|
|
||||||
findOperators ();
|
|
||||||
findAttributes ();
|
|
||||||
desugarFilterPlainArgs ();
|
|
||||||
insertJunctions (); // Deliberately after all desugar calls.
|
|
||||||
|
|
||||||
// Decompose the elements for MODIFICATIONs.
|
|
||||||
decomposeModAttributes ();
|
|
||||||
decomposeModAttributeModifiers ();
|
|
||||||
decomposeModTags ();
|
|
||||||
decomposeModSubstitutions ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.config.getInteger ("debug.parser") >= 3)
|
|
||||||
context.debug ("CLI2::analyze end");
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Scan arguments, looking for any tagged CONFIG, in which case extract the name
|
// Scan arguments, looking for any tagged CONFIG, in which case extract the name
|
||||||
// and value, applying it to context.config.
|
// and value, applying it to context.config.
|
||||||
|
|
|
@ -90,7 +90,6 @@ public:
|
||||||
void add (const std::string&);
|
void add (const std::string&);
|
||||||
void addContextFilter ();
|
void addContextFilter ();
|
||||||
void addRawFilter (const std::string& arg);
|
void addRawFilter (const std::string& arg);
|
||||||
void analyze (bool parse = true, bool strict = false);
|
|
||||||
void applyOverrides ();
|
void applyOverrides ();
|
||||||
const std::string getFilter (bool applyContext = true);
|
const std::string getFilter (bool applyContext = true);
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue