Rename lib prefix to '~lib' (parens aren't valid); Add built-in alignof<T>; Prepare for ArrayBufferView

This commit is contained in:
dcodeIO
2018-04-02 19:05:26 +02:00
parent 3b50720603
commit 06198a3723
51 changed files with 2286 additions and 2209 deletions

View File

@ -93,7 +93,7 @@ exports.compileString = (source, extraArgs={}) => new Promise((resolve, reject)
const libDir = path.join(__dirname, "../std", "assembly");
const libFiles = require("glob").sync("**/*.ts", { cwd: libDir });
libFiles.forEach(file =>
exports.libraryFiles["(lib)/" + file.replace(/\.ts$/, "")] = readFileNode(path.join(libDir, file), { encoding: "utf8" })
exports.libraryFiles["~lib/" + file.replace(/\.ts$/, "")] = readFileNode(path.join(libDir, file), { encoding: "utf8" })
);
}
@ -265,7 +265,7 @@ exports.main = function main(argv, options, callback) {
}
}
// Otherwise try nextFile.ts, nextFile/index.ts, (lib)/nextFile.ts
// Otherwise try nextFile.ts, nextFile/index.ts, ~lib/nextFile.ts
} else {
sourceText = readFile(path.join(baseDir, sourcePath + ".ts"));
if (sourceText !== null) {