mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
oops, rebuild
This commit is contained in:
parent
0cf96b97f6
commit
1bff5ea9be
@ -66,17 +66,13 @@ apply_to_last = function(stms, fn)
|
||||
local _accum_0 = { }
|
||||
local _len_0 = 1
|
||||
for i, stm in ipairs(stms) do
|
||||
local _value_0
|
||||
if i == last_exp_id then
|
||||
_value_0 = fn(stm)
|
||||
_accum_0[_len_0] = fn(stm)
|
||||
else
|
||||
_value_0 = stm
|
||||
_accum_0[_len_0] = stm
|
||||
end
|
||||
if _value_0 ~= nil then
|
||||
_accum_0[_len_0] = _value_0
|
||||
_len_0 = _len_0 + 1
|
||||
end
|
||||
end
|
||||
return _accum_0
|
||||
end)()
|
||||
end
|
||||
@ -463,20 +459,16 @@ local Statement = Transformer({
|
||||
local _list_0 = names
|
||||
for _index_0 = 1, #_list_0 do
|
||||
local name = _list_0[_index_0]
|
||||
local _value_0
|
||||
if type(name) == "table" then
|
||||
_value_0 = name
|
||||
_accum_0[_len_0] = name
|
||||
else
|
||||
_value_0 = {
|
||||
_accum_0[_len_0] = {
|
||||
"dot",
|
||||
name
|
||||
}
|
||||
end
|
||||
if _value_0 ~= nil then
|
||||
_accum_0[_len_0] = _value_0
|
||||
_len_0 = _len_0 + 1
|
||||
end
|
||||
end
|
||||
return _accum_0
|
||||
end)()
|
||||
local real_names = (function()
|
||||
@ -485,12 +477,9 @@ local Statement = Transformer({
|
||||
local _list_0 = names
|
||||
for _index_0 = 1, #_list_0 do
|
||||
local name = _list_0[_index_0]
|
||||
local _value_0 = type(name) == "table" and name[2] or name
|
||||
if _value_0 ~= nil then
|
||||
_accum_0[_len_0] = _value_0
|
||||
_accum_0[_len_0] = type(name) == "table" and name[2] or name
|
||||
_len_0 = _len_0 + 1
|
||||
end
|
||||
end
|
||||
return _accum_0
|
||||
end)()
|
||||
if type(source) == "string" then
|
||||
@ -711,22 +700,18 @@ local Statement = Transformer({
|
||||
local _accum_0 = { }
|
||||
local _len_0 = 1
|
||||
for i, name in ipairs(node.names) do
|
||||
local _value_0
|
||||
if ntype(name) == "table" then
|
||||
do
|
||||
local _with_0 = NameProxy("des")
|
||||
local proxy = _with_0
|
||||
insert(destructures, destructure.build_assign(name, proxy))
|
||||
_value_0 = _with_0
|
||||
_accum_0[_len_0] = _with_0
|
||||
end
|
||||
else
|
||||
_value_0 = name
|
||||
_accum_0[_len_0] = name
|
||||
end
|
||||
if _value_0 ~= nil then
|
||||
_accum_0[_len_0] = _value_0
|
||||
_len_0 = _len_0 + 1
|
||||
end
|
||||
end
|
||||
return _accum_0
|
||||
end)()
|
||||
if next(destructures) then
|
||||
@ -906,10 +891,8 @@ local Statement = Transformer({
|
||||
else
|
||||
_value_0 = tuple
|
||||
end
|
||||
if _value_0 ~= nil then
|
||||
_accum_0[_len_0] = _value_0
|
||||
_len_0 = _len_0 + 1
|
||||
end
|
||||
_continue_0 = true
|
||||
until true
|
||||
if not _continue_0 then
|
||||
|
Loading…
Reference in New Issue
Block a user