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

Method parseLogical

src/Eval.cpp:409–422  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Logical --> Regex {( "and" | "or" | "xor" ) Regex}

Source from the content-addressed store, hash-verified

407////////////////////////////////////////////////////////////////////////////////
408// Logical --> Regex {( "and" | "or" | "xor" ) Regex}
409bool Eval::parseLogical(std::vector<std::pair<std::string, Lexer::Type>>& infix,
410 unsigned int& i) const {
411 if (i < infix.size() && parseRegex(infix, i)) {
412 while (i < infix.size() && infix[i].second == Lexer::Type::op &&
413 (infix[i].first == "and" || infix[i].first == "or" || infix[i].first == "xor")) {
414 ++i;
415 if (!parseRegex(infix, i)) return false;
416 }
417
418 return true;
419 }
420
421 return false;
422}
423
424////////////////////////////////////////////////////////////////////////////////
425// Regex --> Equality {( "~" | "!~" ) Equality}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected