progress
This commit is contained in:
parent
a56ddf5007
commit
fcc88de8d3
10 changed files with 192 additions and 7 deletions
13
src/js/cmdline.js
Normal file
13
src/js/cmdline.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
if(ARGV.length == 1){
|
||||
console.log("Type '" + ARGV[0] + " --help' for help");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
for(var i = 1; i < ARGV.length; i++){
|
||||
if(ARGV[i] == "--help"){
|
||||
console.log("PMake " + pmake.VERSION + " - Pyrite's build script generator");
|
||||
console.log("");
|
||||
console.log("Usage: " + ARGV[0] + " [options] action [arguments]");
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
31
src/js/core.js
Normal file
31
src/js/core.js
Normal 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(){
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue