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

Method parseGeometric

src/Eval.cpp:496–509  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Geometric --> Tag {( "*" | "/" | "%" ) Tag}

Source from the content-addressed store, hash-verified

494////////////////////////////////////////////////////////////////////////////////
495// Geometric --> Tag {( "*" | "/" | "%" ) Tag}
496bool Eval::parseGeometric(std::vector<std::pair<std::string, Lexer::Type>>& infix,
497 unsigned int& i) const {
498 if (i < infix.size() && parseTag(infix, i)) {
499 while (i < infix.size() && infix[i].second == Lexer::Type::op &&
500 (infix[i].first == "*" || infix[i].first == "/" || infix[i].first == "%")) {
501 ++i;
502 if (!parseTag(infix, i)) return false;
503 }
504
505 return true;
506 }
507
508 return false;
509}
510
511////////////////////////////////////////////////////////////////////////////////
512// Tag --> Unary {( "_hastag_" | "_notag_" ) Unary}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected