mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Eval
- Implemented ::getBinaryOperators.
This commit is contained in:
parent
84f9bc52ef
commit
d7378d830f
2 changed files with 11 additions and 0 deletions
10
src/Eval.cpp
10
src/Eval.cpp
|
@ -224,6 +224,16 @@ void Eval::getOperators (std::vector <std::string>& all)
|
|||
all.push_back (operators[i].op);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static.
|
||||
void Eval::getBinaryOperators (std::vector <std::string>& all)
|
||||
{
|
||||
all.clear ();
|
||||
for (unsigned int i = 0; i < NUM_OPERATORS; ++i)
|
||||
if (operators[i].type == 'b')
|
||||
all.push_back (operators[i].op);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Eval::evaluatePostfixStack (
|
||||
const std::vector <std::pair <std::string, Lexer::Type> >& tokens,
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
void debug (bool);
|
||||
|
||||
static void getOperators (std::vector <std::string>&);
|
||||
static void getBinaryOperators (std::vector <std::string>&);
|
||||
|
||||
private:
|
||||
void evaluatePostfixStack (const std::vector <std::pair <std::string, Lexer::Type> >&, Variant&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue