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

Method reportCategorySets

xs/tools/unicode/properties.js:12–31  ·  view source on GitHub ↗
(category)

Source from the content-addressed store, hash-verified

10 return result;
11 }
12 reportCategorySets(category) {
13 category.properties.sort((a, b) => a.name.localeCompare(b.name));
14 for (let property of category.properties) {
15 let ranges = property.ranges;
16 let c = ranges.length;
17 this.report(`#define mxCharSet_${category.name}_${property.name} ${c * 2}`);
18 let string = `static const txInteger ICACHE_RODATA_ATTR gxCharSet_${category.name}_${property.name}[mxCharSet_${category.name}_${property.name}] = {`
19 for (let i = 0; i < c; i++) {
20 if (i % 8 == 0) {
21 this.report(string);
22 string = "\t";
23 }
24 let range = ranges[i];
25 string += `0x${this.toHex(range[0])}, `;
26 string += `0x${this.toHex(range[1])}, `;
27 }
28 this.report(string);
29 this.report("};");
30 }
31 }
32 reportCategoryProperties(category) {
33 let aliases = category.aliases;
34 aliases.sort((a, b) => a.name.localeCompare(b.name));

Callers 1

runMethod · 0.80

Calls 2

reportMethod · 0.80
toHexMethod · 0.65

Tested by

no test coverage detected