Restructure types; Add a use-case specific options parser; Allow (re)creation of specific parser fixtures

This commit is contained in:
dcodeIO
2018-07-03 03:06:01 +02:00
parent 82da2d1f6d
commit 5ca5df3dc7
29 changed files with 486 additions and 279 deletions

View File

@ -1,3 +1,3 @@
Standard library components for use with `tsc` (portable) and `asc` (assembly).
Definition files (.d.ts) and base configurations (.json) are relevant to `tsc` only and not used by `asc`.
Base configurations (.json) and definition files (.d.ts) are relevant to `tsc` only and not used by `asc`.

View File

@ -4,13 +4,8 @@
"target": "esnext",
"module": "commonjs",
"noLib": true,
"types": [],
"rootDirs": [
"./assembly"
],
"allowJs": false
},
"files": [
"./assembly.d.ts"
]
"allowJs": false,
"typeRoots": [ "." ],
"types": [ "assembly/" ]
}
}

View File

@ -3,17 +3,11 @@
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"noLib": true,
"allowJs": true,
"downlevelIteration": true,
"preserveConstEnums": true,
"noLib": true,
"types": [],
"rootDirs": [
"./portable"
],
"allowJs": true
},
"files": [
"./portable.d.ts",
"./portable.js"
]
"typeRoots": [ "." ],
"types": [ "portable/" ]
}
}

View File

@ -216,5 +216,6 @@ globalScope["fmodf"] = function fmodf(x, y) {
return Math.fround(x % y);
};
require("./portable/math")(globalScope);
require("./portable/memory")(globalScope);
globalScope["JSMath"] = Math;
require("./memory")(globalScope);

View File

@ -1,3 +0,0 @@
module.exports = globalScope => {
globalScope["JSMath"] = Math;
};