Initial work of ESM transformation

This commit is contained in:
be5invis 2022-07-16 19:26:49 -07:00
parent 2472c9cff2
commit b8205a63aa
303 changed files with 1959 additions and 2450 deletions

View file

@ -1,29 +0,0 @@
"use strict";
exports.GlyphBlock = class GlyphBlock {
constructor(capture, blockName, body) {
this.capture = capture;
this.blockName = blockName;
this.body = body;
this.resolved = false;
this.exports = {};
}
resolve() {
if (this.resolved) return this.exports;
this.resolved = true;
const pendingApplications = [];
const ExportCapture = fnObj => {
pendingApplications.push(() => {
for (const [k, v] of Object.entries(fnObj())) {
this.exports[k] = v;
}
});
};
this.body(this.capture, ExportCapture);
for (const f of pendingApplications) f();
return this.exports;
}
};