parse and tokenize modules

This commit is contained in:
2026-02-09 12:19:05 -06:00
parent 368511f666
commit 8fc9bfe013
5 changed files with 2359 additions and 2941 deletions

View File

@@ -24,10 +24,9 @@ function use(path) {
if (fd.is_file(file_path)) {
script = text(fd.slurp(file_path))
exports = {}
mach_eval(path, script, {use: use, exports: exports})
use_cache[path] = exports
return exports
result = mach_eval(path, script, {use: use})
use_cache[path] = result
return result
}
// Try embedded C module