mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
moon.debug falls back on lua debug
This commit is contained in:
parent
30d1db85c8
commit
7ff11584f5
@ -13,7 +13,7 @@ dump = util.dump
|
||||
p = (...) ->
|
||||
print dump ...
|
||||
|
||||
debug = {
|
||||
debug = setmetatable {
|
||||
upvalue: (fn, k, v) ->
|
||||
upvalues = {}
|
||||
i = 1
|
||||
@ -31,8 +31,7 @@ debug = {
|
||||
value
|
||||
else
|
||||
lua.debug.setupvalue fn, upvalues[k], v
|
||||
}
|
||||
|
||||
}, __index: lua.debug
|
||||
|
||||
-- run a function with scope injected before its function environment
|
||||
run_with_scope = (fn, scope, ...) ->
|
||||
|
Loading…
Reference in New Issue
Block a user