| 52 | |
| 53 | template<typename T> |
| 54 | std::optional<T> ensureParserAtEnd(AttributeParser& parser, std::optional<T>&& result) { |
| 55 | if (!result) { |
| 56 | return std::nullopt; |
| 57 | } |
| 58 | |
| 59 | parser.tryParseWhitespaces(); |
| 60 | if (!parser.ensureIsAtEnd()) { |
| 61 | return std::nullopt; |
| 62 | } |
| 63 | |
| 64 | return std::move(result); |
| 65 | } |
| 66 | |
| 67 | Result<Value> ValueConverter::toColor(const ColorPalette& colorPalette, const Value& value) { |
| 68 | if (value.isString()) { |
no test coverage detected