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

Method parseRegex

src/Eval.cpp:426–439  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Regex --> Equality {( "~" | "!~" ) Equality}

Source from the content-addressed store, hash-verified

424////////////////////////////////////////////////////////////////////////////////
425// Regex --> Equality {( "~" | "!~" ) Equality}
426bool Eval::parseRegex(std::vector<std::pair<std::string, Lexer::Type>>& infix,
427 unsigned int& i) const {
428 if (i < infix.size() && parseEquality(infix, i)) {
429 while (i < infix.size() && infix[i].second == Lexer::Type::op &&
430 (infix[i].first == "~" || infix[i].first == "!~")) {
431 ++i;
432 if (!parseEquality(infix, i)) return false;
433 }
434
435 return true;
436 }
437
438 return false;
439}
440
441////////////////////////////////////////////////////////////////////////////////
442// Equality --> Comparative {( "==" | "=" | "!==" | "!=" ) Comparative}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected