mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Add stdlib functions from anselme v1
This commit is contained in:
parent
581c60048d
commit
dac5b74fa6
30 changed files with 272 additions and 14 deletions
|
|
@ -77,7 +77,6 @@ local function run(path, interactive)
|
|||
local state = anselme:new()
|
||||
state:load_stdlib()
|
||||
|
||||
state:define("error", "(message=\"error\")", function(message) error(message, 0) end)
|
||||
state:define("interrupt", "(code::string)", function(state, code) state:interrupt(code:to_lua(state), "interrupt") return ast.Nil:new() end, true)
|
||||
state:define("interrupt", "()", function(state) state:interrupt() return ast.Nil:new() end, true)
|
||||
state:define("wait", "(duration::number)", function(duration) coroutine.yield("wait", duration) end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue