intrinsics rewritten without ++, --, etc

This commit is contained in:
2026-02-10 07:19:45 -06:00
parent 3f7e34cd7a
commit c4ff0bc109
13 changed files with 545 additions and 468 deletions

View File

@@ -51,7 +51,7 @@ package.load_config = function(name)
return config_cache[config_path]
if (!fd.is_file(config_path)) {
throw Error(`${config_path} does not exist`)
print(`${config_path} does not exist`); disrupt
}
var content = text(fd.slurp(config_path))
@@ -158,7 +158,7 @@ package.split_alias = function(name, path)
var parts = array(path, '/')
var first_part = parts[0]
try {
var _split = function() {
var config = package.load_config(name)
if (!config) return null
@@ -168,11 +168,11 @@ package.split_alias = function(name, path)
var remaining_path = text(array(parts, 1), '/')
return { package: dep_locator, path: remaining_path }
}
} catch (e) {
// Config doesn't exist or couldn't be loaded
return null
} disruption {
return null
}
return null
return _split()
}
package.gather_dependencies = function(name)