MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / reportRanges

Method reportRanges

xs/tools/unicode/strings.js:12–30  ·  view source on GitHub ↗
(name, ranges)

Source from the content-addressed store, hash-verified

10 return result;
11 }
12 reportRanges(name, ranges) {
13 let c = ranges.length;
14 this.report(`#define mxCharSet_${name} ${c}`);
15 if (c) {
16 let string = `static const txInteger ICACHE_RODATA_ATTR gxCharSet_${name}[mxCharSet_${name}] = {`
17 for (let i = 0; i < c; i++) {
18 if (i % 16 == 0) {
19 this.report(string);
20 string = "\t";
21 }
22 let range = ranges[i];
23 string += `0x${this.toHex(range)}, `;
24 }
25 this.report(string);
26 this.report("};");
27 }
28 else
29 this.report(`#define gxCharSet_${name} C_NULL`);
30 }
31 reportNames(names) {
32 let c = names.length;
33 this.report(`#define mxCharSet_String_Property ${c}`);

Callers 1

runMethod · 0.80

Calls 2

reportMethod · 0.80
toHexMethod · 0.65

Tested by

no test coverage detected