mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI
- Renamed unsweeten methods to desugar, because they remove syntactic sugar.
This commit is contained in:
parent
caaa07f889
commit
24219e23a1
2 changed files with 19 additions and 19 deletions
26
src/CLI.cpp
26
src/CLI.cpp
|
@ -292,12 +292,12 @@ void CLI::analyze ()
|
||||||
categorize ();
|
categorize ();
|
||||||
|
|
||||||
// Remove all the syntactic sugar.
|
// Remove all the syntactic sugar.
|
||||||
unsweetenTags ();
|
desugarTags ();
|
||||||
unsweetenAttributes ();
|
desugarAttributes ();
|
||||||
unsweetenAttributeModifiers ();
|
desugarAttributeModifiers ();
|
||||||
unsweetenPatterns ();
|
desugarPatterns ();
|
||||||
unsweetenIDs ();
|
desugarIDs ();
|
||||||
unsweetenUUIDs ();
|
desugarUUIDs ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -326,7 +326,7 @@ const std::string CLI::getFilter ()
|
||||||
}
|
}
|
||||||
|
|
||||||
dump ("CLI::getFilter");
|
dump ("CLI::getFilter");
|
||||||
return "(" + filter + ")";
|
return "( " + filter + " )";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -516,7 +516,7 @@ bool CLI::canonicalize (
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// +tag --> tags _hastag_ tag
|
// +tag --> tags _hastag_ tag
|
||||||
// -tag --> tags _notag_ tag
|
// -tag --> tags _notag_ tag
|
||||||
void CLI::unsweetenTags ()
|
void CLI::desugarTags ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
@ -560,7 +560,7 @@ void CLI::unsweetenTags ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// <name>:['"][<value>]['"] --> name = value
|
// <name>:['"][<value>]['"] --> name = value
|
||||||
void CLI::unsweetenAttributes ()
|
void CLI::desugarAttributes ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
@ -651,7 +651,7 @@ void CLI::unsweetenAttributes ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// <name>.<mod>[:=]['"]<value>['"] --> name <op> value
|
// <name>.<mod>[:=]['"]<value>['"] --> name <op> value
|
||||||
void CLI::unsweetenAttributeModifiers ()
|
void CLI::desugarAttributeModifiers ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
@ -823,7 +823,7 @@ void CLI::unsweetenAttributeModifiers ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// /pattern/ --> description ~ 'pattern'
|
// /pattern/ --> description ~ 'pattern'
|
||||||
void CLI::unsweetenPatterns ()
|
void CLI::desugarPatterns ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
@ -872,7 +872,7 @@ void CLI::unsweetenPatterns ()
|
||||||
// a range: 5-10
|
// a range: 5-10
|
||||||
// or a combination: 1,3,5-10 12
|
// or a combination: 1,3,5-10 12
|
||||||
//
|
//
|
||||||
void CLI::unsweetenIDs ()
|
void CLI::desugarIDs ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
@ -1063,7 +1063,7 @@ void CLI::unsweetenIDs ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void CLI::unsweetenUUIDs ()
|
void CLI::desugarUUIDs ()
|
||||||
{
|
{
|
||||||
std::vector <A> reconstructed;
|
std::vector <A> reconstructed;
|
||||||
std::vector <A>::iterator a;
|
std::vector <A>::iterator a;
|
||||||
|
|
12
src/CLI.h
12
src/CLI.h
|
@ -79,12 +79,12 @@ private:
|
||||||
void categorize ();
|
void categorize ();
|
||||||
bool exactMatch (const std::string&, const std::string&) const;
|
bool exactMatch (const std::string&, const std::string&) const;
|
||||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||||
void unsweetenTags ();
|
void desugarTags ();
|
||||||
void unsweetenAttributes ();
|
void desugarAttributes ();
|
||||||
void unsweetenAttributeModifiers ();
|
void desugarAttributeModifiers ();
|
||||||
void unsweetenPatterns ();
|
void desugarPatterns ();
|
||||||
void unsweetenIDs ();
|
void desugarIDs ();
|
||||||
void unsweetenUUIDs ();
|
void desugarUUIDs ();
|
||||||
void dump (const std::string&) const;
|
void dump (const std::string&) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue