mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
stdlib cleanup
This commit is contained in:
parent
dac5b74fa6
commit
a212dd7fd1
17 changed files with 212 additions and 190 deletions
|
|
@ -7,7 +7,12 @@ local function define_lua(state, list)
|
|||
end
|
||||
local function load(state, l)
|
||||
for _, m in ipairs(l) do
|
||||
define_lua(state, require("anselme.stdlib."..m))
|
||||
local mod = require("anselme.stdlib."..m)
|
||||
if type(mod) == "string" then
|
||||
parser(mod, m..".ans"):eval(state)
|
||||
else
|
||||
define_lua(state, mod)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -17,21 +22,18 @@ return function(main_state)
|
|||
"tag",
|
||||
"conditionals",
|
||||
"base",
|
||||
"type_check"
|
||||
})
|
||||
|
||||
parser(require("anselme.stdlib.boot_script"), "boot.ans"):eval(main_state)
|
||||
|
||||
load(main_state, {
|
||||
"types",
|
||||
"boot",
|
||||
"number",
|
||||
"string",
|
||||
"text",
|
||||
"pair",
|
||||
"structures",
|
||||
"closure",
|
||||
"checkpoint",
|
||||
"wrap",
|
||||
"attached block",
|
||||
"function",
|
||||
"resume",
|
||||
"persist",
|
||||
"script"
|
||||
})
|
||||
|
||||
parser(require("anselme.stdlib.script_script"), "script.ans"):eval(main_state)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue