This commit is contained in:
Nishi 2026-05-08 05:18:35 +09:00
commit fcc88de8d3
Signed by: nishi
GPG key ID: 27EF69B208EB9343
10 changed files with 192 additions and 7 deletions

31
src/js/core.js Normal file
View file

@ -0,0 +1,31 @@
const pmake = {
VERSION: "0.0"
};
pmake.inherit = function(base){
const func = function(){};
Object.setPrototypeOf(func.prototype, base.prototype);
return func;
};
pmake.inherited = function(base, parent){
var proto = base.prototype;
while(proto){
if(proto == parent.prototype) return true;
proto = Object.getPrototypeOf(proto);
}
return false;
}
pmake.register = function(base){
if(pmake.inherited(base, Compiler)){
}
}
function Compiler(){
}