Mercurial Hosting > luan
diff src/luan/modules/Boot.luan @ 1570:81288d8b20a2
add Io.relative_file_name
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 18 Nov 2020 20:41:49 -0700 |
parents | adf83ae2b9ea |
children | c922446f53aa |
line wrap: on
line diff
--- a/src/luan/modules/Boot.luan Wed Nov 18 19:41:20 2020 -0700 +++ b/src/luan/modules/Boot.luan Wed Nov 18 20:41:49 2020 -0700 @@ -14,7 +14,6 @@ local LuanUrl = require "java:luan.modules.url.LuanUrl" local LuanJava = require "java:luan.Luan" local LuanTable = require "java:luan.LuanTable" -local LuanException = require "java:luan.LuanException" local Boot = {} @@ -226,25 +225,6 @@ end Boot.uri = uri ---[[ -local function get_caller_file() - for _, ste in ipairs(LuanException.getLuanStackTrace()) do - local f = ste.getFileName() - if f ~= "luan:Boot.luan" then - return f - end - end - error() -end - -function schemes.rel(path) - local f = get_caller_file() -System.out.println(f) - f = uri(f) - f.parent or error "source isn't file" - return f.parent().child(path) -end -]] function Boot.read(uri_str) -- for PackageLuan.java local u = uri(uri_str)