mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
maybe actually make this work correctly
This commit is contained in:
parent
61b825fa5a
commit
ff437509f1
@ -29,11 +29,16 @@ value = function(op)
|
|||||||
end
|
end
|
||||||
local tree
|
local tree
|
||||||
tree = function(block)
|
tree = function(block)
|
||||||
local _list_0 = block
|
return table.concat((function()
|
||||||
for _index_0 = 1, #_list_0 do
|
local _accum_0 = { }
|
||||||
local value = _list_0[_index_0]
|
local _len_0 = 1
|
||||||
flat_value(value)
|
for _index_0 = 1, #block do
|
||||||
end
|
local value = block[_index_0]
|
||||||
|
_accum_0[_len_0] = flat_value(value)
|
||||||
|
_len_0 = _len_0 + 1
|
||||||
|
end
|
||||||
|
return _accum_0
|
||||||
|
end)(), "\n")
|
||||||
end
|
end
|
||||||
return {
|
return {
|
||||||
value = value,
|
value = value,
|
||||||
|
@ -12,7 +12,7 @@ value = (op) ->
|
|||||||
flat_value op
|
flat_value op
|
||||||
|
|
||||||
tree = (block) ->
|
tree = (block) ->
|
||||||
flat_value value for value in *block
|
table.concat [flat_value value for value in *block], "\n"
|
||||||
|
|
||||||
{ :value, :tree }
|
{ :value, :tree }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user