(incText, name)
| 89 | } |
| 90 | |
| 91 | function parseIncPairRanges(incText, name) { |
| 92 | const block = extractBlock(incText, `static const zr_unicode_range_t ${name}[]`); |
| 93 | const out = []; |
| 94 | const re = /\{\s*(0x[0-9A-Fa-f]+)u\s*,\s*(0x[0-9A-Fa-f]+)u\s*\}/g; |
| 95 | for (;;) { |
| 96 | const m = re.exec(block); |
| 97 | if (!m) break; |
| 98 | out.push(Number.parseInt(m[1], 16), Number.parseInt(m[2], 16)); |
| 99 | } |
| 100 | if (out.length === 0) throw new Error(`parsed 0 ranges from inc for ${name}`); |
| 101 | return out; |
| 102 | } |
| 103 | |
| 104 | function parseTsUint32Array(tsText, exportName) { |
| 105 | const marker = `export const ${exportName} = new Uint32Array([`; |
no test coverage detected