(text, startMarker)
| 39 | } |
| 40 | |
| 41 | function extractBlock(text, startMarker) { |
| 42 | const start = text.indexOf(startMarker); |
| 43 | if (start < 0) throw new Error(`missing marker: ${startMarker}`); |
| 44 | const brace = text.indexOf("{", start); |
| 45 | if (brace < 0) throw new Error(`missing '{' after marker: ${startMarker}`); |
| 46 | const end = text.indexOf("};", brace); |
| 47 | if (end < 0) throw new Error(`missing '};' terminator for marker: ${startMarker}`); |
| 48 | return text.slice(brace + 1, end); |
| 49 | } |
| 50 | |
| 51 | function parseGcbEnum(headerText) { |
| 52 | const start = headerText.indexOf("typedef enum zr_gcb_class_t"); |
no outgoing calls
no test coverage detected