| 23 | |
| 24 | template<> |
| 25 | inline StatusWithReason fromString(const std::string& from, |
| 26 | pdal::expr::ConditionalExpression& expr) |
| 27 | { |
| 28 | std::string error; |
| 29 | |
| 30 | expr::Lexer lexer(from); |
| 31 | expr::ConditionalParser parser(lexer); |
| 32 | if (!parser.expression(expr)) |
| 33 | return { -1, parser.error() }; |
| 34 | if (!parser.checkEnd()) |
| 35 | return { -1, "Found '" + from.substr(lexer.pos()) + "' following valid expression." }; |
| 36 | return {}; |
| 37 | } |
| 38 | |
| 39 | } // namespace Util |
| 40 |
nothing calls this directly
no test coverage detected