MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / evaluatePostfixExpression

Method evaluatePostfixExpression

src/Eval.cpp:145–157  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

143
144////////////////////////////////////////////////////////////////////////////////
145void Eval::evaluatePostfixExpression(const std::string& e, Variant& v) const {
146 // Reduce e to a vector of tokens.
147 Lexer l(e);
148 std::vector<std::pair<std::string, Lexer::Type>> tokens;
149 std::string token;
150 Lexer::Type type;
151 while (l.token(token, type)) tokens.emplace_back(token, type);
152
153 if (_debug) Context::getContext().debug("FILTER Postfix " + dump(tokens));
154
155 // Call the postfix evaluator.
156 evaluatePostfixStack(tokens, v);
157}
158
159////////////////////////////////////////////////////////////////////////////////
160void Eval::compileExpression(const std::vector<std::pair<std::string, Lexer::Type>>& precompiled) {

Callers 3

TEST_NAMEFunction · 0.80
mainFunction · 0.80
executeMethod · 0.80

Calls 2

tokenMethod · 0.80
debugMethod · 0.45

Tested by 1

TEST_NAMEFunction · 0.64