Improving compiler.

This commit is contained in:
2022-01-04 21:36:37 -08:00
parent c9ebb85d13
commit dfd205ce22
28 changed files with 500 additions and 183 deletions

21
scripts/util.js Normal file
View File

@@ -0,0 +1,21 @@
const arrayToString = arr => {
const b = arr.map(n => {
return '0x' + (n.toString(16).padStart(2, '0').toUpperCase());
});
let str = '';
for(let i = 0; i < b.length; i += 16) {
str += ' ';
for(let x = i; x < Math.min(i+16, b.length); x++) {
str += b[x];
str += ',';
}
str += '\n';
}
return str;
}
module.exports = {
arrayToString
}