MCPcopy Create free account
hub / github.com/PDAL/PDAL / notexpr

Method notexpr

filters/private/expr/ConditionalParser.cpp:78–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78bool ConditionalParser::notexpr(Expression& expr)
79{
80 if (!match(TokenType::Not))
81 return primarylogexpr(expr);
82
83 // Matched !
84 if (!primarylogexpr(expr))
85 {
86 setError("Expected expression following '!'.");
87 return false;
88 }
89
90 NodePtr sub = expr.popNode();
91 if (sub->isValue())
92 {
93 setError("Can't apply '!' to numeric value.");
94 return false;
95 }
96 expr.pushNode(NodePtr(new NotNode(NodeType::Not, std::move(sub))));
97 return true;
98}
99
100bool ConditionalParser::primarylogexpr(Expression& expr)
101{

Callers

nothing calls this directly

Calls 3

popNodeMethod · 0.80
isValueMethod · 0.80
pushNodeMethod · 0.80

Tested by

no test coverage detected