Skip to content

Commit

Permalink
guaranteed_to_break_and_you_will_not_receive_support
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jan 3, 2024
1 parent b27142a commit dd497b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compiler/compile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const IRGenerator = require('./irgen');
const {IRGenerator} = require('./irgen');
const JSGenerator = require('./jsgen');

const compile = thread => {
Expand Down
5 changes: 4 additions & 1 deletion src/compiler/irgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1691,4 +1691,7 @@ class IRGenerator {
}
}

module.exports = IRGenerator;
module.exports = {
ScriptTreeGenerator,
IRGenerator
};
11 changes: 10 additions & 1 deletion src/virtual-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,16 @@ class VirtualMachine extends EventEmitter {
this.exports = {
Sprite,
RenderedTarget,
JSZip
JSZip,

guaranteed_to_break_and_you_will_not_receive_support: () => {
console.warn('You are using unsupported APIs. WHEN your code breaks, do not expect help.');
return ({
JSGenerator: require('./compiler/jsgen.js'),
IRGenerator: require('./compiler/irgen.js').IRGenerator,
ScriptTreeGenerator: require('./compiler/irgen.js').ScriptTreeGenerator
});
}
};
}

Expand Down

0 comments on commit dd497b8

Please sign in to comment.