This commit is contained in:
leaf corcoran 2013-01-12 13:02:27 -08:00
parent 7cd0fcc632
commit 673e0cf61a
9 changed files with 68 additions and 68 deletions

View File

@ -117,12 +117,12 @@ do
if "table" == type(t) then
return (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = t
for _index_0 = 1, #_list_0 do
local v = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = strip(v)
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -353,7 +353,7 @@ do
declare = function(self, names)
local undeclared = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = names
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
@ -373,8 +373,8 @@ do
_value_0 = real_name
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -520,12 +520,12 @@ do
local _with_0 = Line()
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = values
for _index_0 = 1, #_list_0 do
local v = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:value(v)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), delim)

View File

@ -26,12 +26,12 @@ local statement_compilers = {
local _with_0 = self:line("local ")
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = undeclared
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:name(name)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
@ -80,12 +80,12 @@ local statement_compilers = {
local _with_0 = self:line("local ")
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = names
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:name(name)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
@ -114,12 +114,12 @@ local statement_compilers = {
end
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = names
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:value(name)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
@ -127,12 +127,12 @@ local statement_compilers = {
_with_0:append(" = ")
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = values
for _index_0 = 1, #_list_0 do
local v = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:value(v)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
@ -223,24 +223,24 @@ local statement_compilers = {
local _with_0 = self:block(loop)
loop:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = names
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = _with_0:name(name, false)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
loop:append(" in ")
loop:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = exps
for _index_0 = 1, #_list_0 do
local exp = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:value(exp)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ",")

View File

@ -26,11 +26,11 @@ local value_compilers = {
local _with_0 = self:line()
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i, v in ipairs(node) do
if i > 1 then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _comp(i, v)
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -43,12 +43,12 @@ local value_compilers = {
local _with_0 = self:line()
_with_0:append_list((function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = node
for _index_0 = 2, #_list_0 do
local v = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = self:value(v)
_len_0 = _len_0 + 1
end
return _accum_0
end)(), ", ")
@ -118,7 +118,7 @@ local value_compilers = {
local self_args = { }
local arg_names = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = args
for _index_0 = 1, #_list_0 do
local arg = _list_0[_index_0]
@ -136,8 +136,8 @@ local value_compilers = {
end
local _value_0 = name
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -185,12 +185,12 @@ local value_compilers = {
end
local self_arg_values = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_2 = self_args
for _index_0 = 1, #_list_2 do
local arg = _list_2[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = arg[2]
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -205,14 +205,14 @@ local value_compilers = {
if #args > #arg_names then
arg_names = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_2 = args
for _index_0 = 1, #_list_2 do
local arg = _list_2[_index_0]
local _value_0 = arg[1]
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0

View File

@ -11,12 +11,12 @@ flat_value = function(op, depth)
end
local items = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = op
for _index_0 = 1, #_list_0 do
local item = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = flat_value(item, depth + 1)
_len_0 = _len_0 + 1
end
return _accum_0
end)()

View File

@ -44,13 +44,13 @@ truncate_traceback = function(traceback, chunk_func)
end
traceback = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = traceback
local _max_0 = stop
for _index_0 = 1, _max_0 < 0 and #_list_0 + _max_0 or _max_0 do
local t = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = t
_len_0 = _len_0 + 1
end
return _accum_0
end)()

View File

@ -64,7 +64,7 @@ apply_to_last = function(stms, fn)
end
return (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i, stm in ipairs(stms) do
local _value_0
if i == last_exp_id then
@ -73,8 +73,8 @@ apply_to_last = function(stms, fn)
_value_0 = stm
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -440,7 +440,7 @@ local Statement = Transformer({
local _, names, source = unpack(node)
local stubs = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = names
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
@ -454,22 +454,22 @@ local Statement = Transformer({
}
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
end)()
local real_names = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
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
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -479,15 +479,15 @@ local Statement = Transformer({
names = real_names,
values = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = stubs
for _index_0 = 1, #_list_0 do
local stub = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = build.chain({
base = source,
stub
})
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -505,15 +505,15 @@ local Statement = Transformer({
names = real_names,
values = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = stubs
for _index_0 = 1, #_list_0 do
local stub = _list_0[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = build.chain({
base = source_name,
stub
})
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -581,13 +581,13 @@ local Statement = Transformer({
build.declare({
names = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = stm[2]
for _index_0 = 1, #_list_0 do
local name = _list_0[_index_0]
if type(name) == "string" then
_len_0 = _len_0 + 1
_accum_0[_len_0] = name
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -690,7 +690,7 @@ local Statement = Transformer({
local destructures = { }
node.names = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i, name in ipairs(node.names) do
local _value_0
if ntype(name) == "table" then
@ -704,8 +704,8 @@ local Statement = Transformer({
_value_0 = name
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -872,7 +872,7 @@ local Statement = Transformer({
local constructor = nil
properties = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_1 = properties
for _index_0 = 1, #_list_1 do
local tuple = _list_1[_index_0]
@ -885,8 +885,8 @@ local Statement = Transformer({
_value_0 = tuple
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -1072,12 +1072,12 @@ local Statement = Transformer({
if chain then
local slice = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_1 = chain
for _index_0 = 3, #_list_1 do
local item = _list_1[_index_0]
_len_0 = _len_0 + 1
_accum_0[_len_0] = item
_len_0 = _len_0 + 1
end
return _accum_0
end)()

View File

@ -164,24 +164,24 @@ split_assign = function(assign)
"assign",
(function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i = start, stop do
local _value_0 = names[i]
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
end)(),
(function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i = start, stop do
local _value_0 = values[i]
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -201,12 +201,12 @@ split_assign = function(assign)
else
name_slice = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i = start, total_names do
local _value_0 = names[i]
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -220,12 +220,12 @@ split_assign = function(assign)
else
value_slice = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for i = start, total_values do
local _value_0 = values[i]
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0

View File

@ -65,7 +65,7 @@ do
chain = function(self, ...)
local items = (function(...)
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = {
...
}
@ -81,8 +81,8 @@ do
_value_0 = i
end
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0

View File

@ -75,10 +75,10 @@ split = function(str, delim)
str = str .. delim
return (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for m in str:gmatch("(.-)" .. delim) do
_len_0 = _len_0 + 1
_accum_0[_len_0] = m
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -102,12 +102,12 @@ dump = function(what)
depth = depth + 1
local lines = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for k, v in pairs(what) do
local _value_0 = (" "):rep(depth * 4) .. "[" .. tostring(k) .. "] = " .. _dump(v, depth)
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0
@ -124,13 +124,13 @@ local debug_posmap
debug_posmap = function(posmap, moon_code, lua_code)
local tuples = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
for k, v in pairs(posmap) do
_len_0 = _len_0 + 1
_accum_0[_len_0] = {
k,
v
}
_len_0 = _len_0 + 1
end
return _accum_0
end)()
@ -139,7 +139,7 @@ debug_posmap = function(posmap, moon_code, lua_code)
end)
local lines = (function()
local _accum_0 = { }
local _len_0 = 0
local _len_0 = 1
local _list_0 = tuples
for _index_0 = 1, #_list_0 do
local pair = _list_0[_index_0]
@ -149,8 +149,8 @@ debug_posmap = function(posmap, moon_code, lua_code)
local moon_text = get_closest_line(moon_code, moon_line)
local _value_0 = tostring(pos) .. "\t " .. tostring(lua_line) .. ":[ " .. tostring(trim(lua_text)) .. " ] >> " .. tostring(moon_line) .. ":[ " .. tostring(trim(moon_text)) .. " ]"
if _value_0 ~= nil then
_len_0 = _len_0 + 1
_accum_0[_len_0] = _value_0
_len_0 = _len_0 + 1
end
end
return _accum_0