| 254 | }; |
| 255 | |
| 256 | spv_result_t Parser::parse(const uint32_t* words, size_t num_words, |
| 257 | spv_diagnostic* diagnostic_arg) { |
| 258 | _ = State(words, num_words, diagnostic_arg); |
| 259 | |
| 260 | const spv_result_t result = parseModule(); |
| 261 | |
| 262 | // Clear the module state. The tables might be big. |
| 263 | _ = State(); |
| 264 | |
| 265 | return result; |
| 266 | } |
| 267 | |
| 268 | spv_result_t Parser::parseModule() { |
| 269 | if (!_.words) return diagnostic() << "Missing module."; |
no test coverage detected