| 100 | class Parser { |
| 101 | public: |
| 102 | explicit Parser(std::string_view text) { |
| 103 | if (!yaml_parser_initialize(&parser_)) { |
| 104 | throw std::runtime_error("failed to initialize yaml parser"); |
| 105 | } |
| 106 | initialized_ = true; |
| 107 | yaml_parser_set_input_string( |
| 108 | &parser_, |
| 109 | reinterpret_cast<const unsigned char *>(text.data()), |
| 110 | text.size()); |
| 111 | } |
| 112 | |
| 113 | ~Parser() { |
| 114 | if (primary_loaded_) { |
nothing calls this directly
no test coverage detected