CLI2: Added ::addFilter method

This commit is contained in:
Paul Beckingham 2015-06-22 10:30:29 -04:00
parent c8fd51bd27
commit 82c5d019a3
2 changed files with 10 additions and 4 deletions

View file

@ -455,11 +455,15 @@ void CLI2::addContextFilter ()
context.footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
}
}
*/
////////////////////////////////////////////////////////////////////////////////
// Process raw string into parsed filter.
void CLI2::addRawFilter (const std::string& arg)
// Process raw string.
void CLI2::addFilter (const std::string& arg)
{
if (arg.length ())
add ("(");
std::string lexeme;
Lexer::Type type;
Lexer lex (arg);
@ -467,8 +471,10 @@ void CLI2::addRawFilter (const std::string& arg)
while (lex.token (lexeme, type))
add (lexeme);
if (arg.length ())
add (")");
}
*/
////////////////////////////////////////////////////////////////////////////////
// Parset the commnad line, identifiying filter components, expanding syntactic

View file

@ -75,8 +75,8 @@ public:
void analyze ();
/*
void addContextFilter ();
void addRawFilter (const std::string& arg);
*/
void addFilter (const std::string& arg);
void prepareFilter (bool applyContext = true);
const std::vector <std::string> getWords (bool filtered = true);
bool canonicalize (std::string&, const std::string&, const std::string&) const;