CLI: Abstract adding new raw filter to a new helper method
This commit is contained in:
committed by
Paul Beckingham
parent
09fe5be086
commit
1abda3900b
14
src/CLI.cpp
14
src/CLI.cpp
@@ -374,6 +374,20 @@ void CLI::add (const std::string& arg)
|
||||
analyze ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Process raw string into parsed filter.
|
||||
//
|
||||
void CLI::addRawFilter (const std::string& arg)
|
||||
{
|
||||
std::string lexeme;
|
||||
Lexer::Type type;
|
||||
Lexer lex (arg);
|
||||
lex.ambiguity (false);
|
||||
|
||||
while (lex.token (lexeme, type))
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user