mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Eval: Removed unused ::compileExpression override
This commit is contained in:
parent
64bf571c13
commit
b7bbd96b62
2 changed files with 0 additions and 28 deletions
27
src/Eval.cpp
27
src/Eval.cpp
|
@ -165,33 +165,6 @@ void Eval::evaluatePostfixExpression (const std::string& e, Variant& v) const
|
||||||
evaluatePostfixStack (tokens, v);
|
evaluatePostfixStack (tokens, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
void Eval::compileExpression (const std::string& e)
|
|
||||||
{
|
|
||||||
// Reduce e to a vector of tokens.
|
|
||||||
Lexer l (e);
|
|
||||||
std::string token;
|
|
||||||
Lexer::Type type;
|
|
||||||
while (l.token (token, type))
|
|
||||||
{
|
|
||||||
if (_debug)
|
|
||||||
context.debug ("Lexer '" + token + "' " + Lexer::typeToString (type));
|
|
||||||
_compiled.push_back (std::pair <std::string, Lexer::Type> (token, type));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse for syntax checking and operator replacement.
|
|
||||||
if (_debug)
|
|
||||||
context.debug ("[1;37;42mFILTER[0m Infix " + dump (_compiled));
|
|
||||||
infixParse (_compiled);
|
|
||||||
if (_debug)
|
|
||||||
context.debug ("[1;37;42mFILTER[0m Infix parsed " + dump (_compiled));
|
|
||||||
|
|
||||||
// Convert infix --> postfix.
|
|
||||||
infixToPostfix (_compiled);
|
|
||||||
if (_debug)
|
|
||||||
context.debug ("[1;37;42mFILTER[0m Postfix " + dump (_compiled));
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Eval::compileExpression (
|
void Eval::compileExpression (
|
||||||
const std::vector <std::pair <std::string, Lexer::Type>>& precompiled)
|
const std::vector <std::pair <std::string, Lexer::Type>>& precompiled)
|
||||||
|
|
|
@ -44,7 +44,6 @@ public:
|
||||||
void addSource (bool (*fn)(const std::string&, Variant&));
|
void addSource (bool (*fn)(const std::string&, Variant&));
|
||||||
void evaluateInfixExpression (const std::string&, Variant&) const;
|
void evaluateInfixExpression (const std::string&, Variant&) const;
|
||||||
void evaluatePostfixExpression (const std::string&, Variant&) const;
|
void evaluatePostfixExpression (const std::string&, Variant&) const;
|
||||||
void compileExpression (const std::string&);
|
|
||||||
void compileExpression (const std::vector <std::pair <std::string, Lexer::Type>>&);
|
void compileExpression (const std::vector <std::pair <std::string, Lexer::Type>>&);
|
||||||
void evaluateCompiledExpression (Variant&);
|
void evaluateCompiledExpression (Variant&);
|
||||||
void debug (bool);
|
void debug (bool);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue