mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
rebuild
This commit is contained in:
parent
1ea8f3fb6f
commit
44b5517a54
@ -208,10 +208,10 @@ Block_ = (function(_parent_0)
|
|||||||
local header = flatten(self.header)
|
local header = flatten(self.header)
|
||||||
if #self._lines == 0 then
|
if #self._lines == 0 then
|
||||||
local footer = flatten(self.footer)
|
local footer = flatten(self.footer)
|
||||||
return(concat({
|
return concat({
|
||||||
header,
|
header,
|
||||||
footer
|
footer
|
||||||
}, " "))
|
}, " ")
|
||||||
end
|
end
|
||||||
local indent = indent_char:rep(self.indent)
|
local indent = indent_char:rep(self.indent)
|
||||||
if not self.delim then
|
if not self.delim then
|
||||||
@ -252,7 +252,7 @@ Block_ = (function(_parent_0)
|
|||||||
end,
|
end,
|
||||||
value = function(self, node, ...)
|
value = function(self, node, ...)
|
||||||
if type(node) ~= "table" then
|
if type(node) ~= "table" then
|
||||||
return(tostring(node))
|
return tostring(node)
|
||||||
end
|
end
|
||||||
local fn = value_compile[node[1]]
|
local fn = value_compile[node[1]]
|
||||||
if not fn then
|
if not fn then
|
||||||
|
@ -36,11 +36,11 @@ line_compile = {
|
|||||||
assign = function(self, node)
|
assign = function(self, node)
|
||||||
local _, names, values = unpack(node)
|
local _, names, values = unpack(node)
|
||||||
if #values == 1 and cascading[ntype(values[1])] then
|
if #values == 1 and cascading[ntype(values[1])] then
|
||||||
return(self:stm({
|
return self:stm({
|
||||||
"assign",
|
"assign",
|
||||||
names,
|
names,
|
||||||
values[1]
|
values[1]
|
||||||
}))
|
})
|
||||||
end
|
end
|
||||||
local undeclared = self:declare(names)
|
local undeclared = self:declare(names)
|
||||||
local declare = "local " .. concat(undeclared, ", ")
|
local declare = "local " .. concat(undeclared, ", ")
|
||||||
@ -180,7 +180,7 @@ line_compile = {
|
|||||||
_with_0:append_list(values, ", ")
|
_with_0:append_list(values, ", ")
|
||||||
line = _with_0
|
line = _with_0
|
||||||
end
|
end
|
||||||
return(line)
|
return line
|
||||||
end
|
end
|
||||||
self:add(self:line("local ", concat(final_names, ", ")))
|
self:add(self:line("local ", concat(final_names, ", ")))
|
||||||
do
|
do
|
||||||
@ -371,7 +371,7 @@ line_compile = {
|
|||||||
})
|
})
|
||||||
loop = _with_0
|
loop = _with_0
|
||||||
end
|
end
|
||||||
return(loop)
|
return loop
|
||||||
end
|
end
|
||||||
local loop
|
local loop
|
||||||
do
|
do
|
||||||
|
@ -163,7 +163,7 @@ value_compile = {
|
|||||||
end
|
end
|
||||||
local sup = self:get("super")
|
local sup = self:get("super")
|
||||||
if callee == "super" and sup then
|
if callee == "super" and sup then
|
||||||
return(self:value(sup(self, node)))
|
return self:value(sup(self, node))
|
||||||
end
|
end
|
||||||
local chain_item
|
local chain_item
|
||||||
chain_item = function(node)
|
chain_item = function(node)
|
||||||
|
Loading…
Reference in New Issue
Block a user