mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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 ();
|
||||
|
||||
// Remove all the syntactic sugar.
|
||||
unsweetenTags ();
|
||||
unsweetenAttributes ();
|
||||
unsweetenAttributeModifiers ();
|
||||
unsweetenPatterns ();
|
||||
unsweetenIDs ();
|
||||
unsweetenUUIDs ();
|
||||
desugarTags ();
|
||||
desugarAttributes ();
|
||||
desugarAttributeModifiers ();
|
||||
desugarPatterns ();
|
||||
desugarIDs ();
|
||||
desugarUUIDs ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -326,7 +326,7 @@ const std::string CLI::getFilter ()
|
|||
}
|
||||
|
||||
dump ("CLI::getFilter");
|
||||
return "(" + filter + ")";
|
||||
return "( " + filter + " )";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -516,7 +516,7 @@ bool CLI::canonicalize (
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// +tag --> tags _hastag_ tag
|
||||
// -tag --> tags _notag_ tag
|
||||
void CLI::unsweetenTags ()
|
||||
void CLI::desugarTags ()
|
||||
{
|
||||
std::vector <A> reconstructed;
|
||||
std::vector <A>::iterator a;
|
||||
|
@ -560,7 +560,7 @@ void CLI::unsweetenTags ()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// <name>:['"][<value>]['"] --> name = value
|
||||
void CLI::unsweetenAttributes ()
|
||||
void CLI::desugarAttributes ()
|
||||
{
|
||||
std::vector <A> reconstructed;
|
||||
std::vector <A>::iterator a;
|
||||
|
@ -651,7 +651,7 @@ void CLI::unsweetenAttributes ()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// <name>.<mod>[:=]['"]<value>['"] --> name <op> value
|
||||
void CLI::unsweetenAttributeModifiers ()
|
||||
void CLI::desugarAttributeModifiers ()
|
||||
{
|
||||
std::vector <A> reconstructed;
|
||||
std::vector <A>::iterator a;
|
||||
|
@ -823,7 +823,7 @@ void CLI::unsweetenAttributeModifiers ()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// /pattern/ --> description ~ 'pattern'
|
||||
void CLI::unsweetenPatterns ()
|
||||
void CLI::desugarPatterns ()
|
||||
{
|
||||
std::vector <A> reconstructed;
|
||||
std::vector <A>::iterator a;
|
||||
|
@ -872,7 +872,7 @@ void CLI::unsweetenPatterns ()
|
|||
// a range: 5-10
|
||||
// or a combination: 1,3,5-10 12
|
||||
//
|
||||
void CLI::unsweetenIDs ()
|
||||
void CLI::desugarIDs ()
|
||||
{
|
||||
std::vector <A> reconstructed;
|
||||
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>::iterator a;
|
||||
|
|
12
src/CLI.h
12
src/CLI.h
|
@ -79,12 +79,12 @@ private:
|
|||
void categorize ();
|
||||
bool exactMatch (const std::string&, const std::string&) const;
|
||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||
void unsweetenTags ();
|
||||
void unsweetenAttributes ();
|
||||
void unsweetenAttributeModifiers ();
|
||||
void unsweetenPatterns ();
|
||||
void unsweetenIDs ();
|
||||
void unsweetenUUIDs ();
|
||||
void desugarTags ();
|
||||
void desugarAttributes ();
|
||||
void desugarAttributeModifiers ();
|
||||
void desugarPatterns ();
|
||||
void desugarIDs ();
|
||||
void desugarUUIDs ();
|
||||
void dump (const std::string&) const;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue