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

Method parseUnary

src/Eval.cpp:530–545  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Unary --> [( "-" | "+" | "!" )] Exponent

Source from the content-addressed store, hash-verified

528////////////////////////////////////////////////////////////////////////////////
529// Unary --> [( "-" | "+" | "!" )] Exponent
530bool Eval::parseUnary(std::vector<std::pair<std::string, Lexer::Type>>& infix,
531 unsigned int& i) const {
532 if (i < infix.size()) {
533 if (infix[i].first == "-") {
534 infix[i].first = "_neg_";
535 ++i;
536 } else if (infix[i].first == "+") {
537 infix[i].first = "_pos_";
538 ++i;
539 } else if (infix[i].first == "!") {
540 ++i;
541 }
542 }
543
544 return parseExponent(infix, i);
545}
546
547////////////////////////////////////////////////////////////////////////////////
548// Exponent --> Primitive ["^" Primitive]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected