mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
rebuild 🐱
This commit is contained in:
parent
a41637ba1e
commit
9a6619214d
@ -32,7 +32,6 @@ local mtype = util.moon.type
|
||||
local indent_char = " "
|
||||
local Line, DelayedLine, Lines, Block, RootBlock
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
mark_pos = function(self, pos, line)
|
||||
if line == nil then
|
||||
@ -133,25 +132,14 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self)
|
||||
self.posmap = { }
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Lines",
|
||||
__parent = _parent_0
|
||||
__name = "Lines"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -159,13 +147,9 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Lines = _class_0
|
||||
end
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
pos = nil,
|
||||
_append_single = function(self, item)
|
||||
@ -237,27 +221,12 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, ...)
|
||||
if _parent_0 then
|
||||
return _parent_0.__init(self, ...)
|
||||
end
|
||||
end,
|
||||
__init = function() end,
|
||||
__base = _base_0,
|
||||
__name = "Line",
|
||||
__parent = _parent_0
|
||||
__name = "Line"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -265,13 +234,9 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Line = _class_0
|
||||
end
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
prepare = function() end,
|
||||
render = function(self)
|
||||
@ -280,25 +245,14 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, fn)
|
||||
self.prepare = fn
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "DelayedLine",
|
||||
__parent = _parent_0
|
||||
__name = "DelayedLine"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -306,13 +260,9 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
DelayedLine = _class_0
|
||||
end
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
header = "do",
|
||||
footer = "end",
|
||||
@ -608,9 +558,6 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, parent, header, footer)
|
||||
self.parent, self.header, self.footer = parent, header, footer
|
||||
@ -638,17 +585,9 @@ do
|
||||
end
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Block",
|
||||
__parent = _parent_0
|
||||
__name = "Block"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -656,9 +595,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Block = _class_0
|
||||
end
|
||||
do
|
||||
@ -682,9 +618,7 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, options)
|
||||
self.options = options
|
||||
@ -697,7 +631,7 @@ do
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
if val == nil then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
@ -710,7 +644,7 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
if _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
RootBlock = _class_0
|
||||
|
@ -10,7 +10,6 @@ Set = function(items)
|
||||
end
|
||||
local Stack
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
__tostring = function(self)
|
||||
return "<Stack {" .. concat(self, ", ") .. "}>"
|
||||
@ -27,9 +26,6 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, ...)
|
||||
local _list_0 = {
|
||||
@ -42,17 +38,9 @@ do
|
||||
return nil
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Stack",
|
||||
__parent = _parent_0
|
||||
__name = "Stack"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -60,9 +48,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Stack = _class_0
|
||||
end
|
||||
local lua_keywords = Set({
|
||||
|
@ -15,33 +15,21 @@ local NOOP = {
|
||||
}
|
||||
local Run, apply_to_last, is_singular, extract_declarations, expand_elseif_assign, constructor_name, with_continue_listener, Transformer, construct_comprehension, Statement, Accumulator, default_accumulator, implicitly_return, Value
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
call = function(self, state)
|
||||
return self.fn(state)
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, fn)
|
||||
self.fn = fn
|
||||
self[1] = "run"
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Run",
|
||||
__parent = _parent_0
|
||||
__name = "Run"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -49,9 +37,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Run = _class_0
|
||||
end
|
||||
apply_to_last = function(stms, fn)
|
||||
@ -218,7 +203,6 @@ with_continue_listener = function(body)
|
||||
}
|
||||
end
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
transform = function(self, scope, node, ...)
|
||||
if self.seen_nodes[node] then
|
||||
@ -253,9 +237,6 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, transformers)
|
||||
self.transformers = transformers
|
||||
@ -264,17 +245,9 @@ do
|
||||
})
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Transformer",
|
||||
__parent = _parent_0
|
||||
__name = "Transformer"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -282,9 +255,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Transformer = _class_0
|
||||
end
|
||||
construct_comprehension = function(inner, clauses)
|
||||
@ -1259,7 +1229,6 @@ Statement = Transformer({
|
||||
end
|
||||
})
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
body_idx = {
|
||||
["for"] = 4,
|
||||
@ -1320,9 +1289,6 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, accum_name)
|
||||
self.accum_name = accum_name or NameProxy("accum")
|
||||
@ -1330,17 +1296,9 @@ do
|
||||
self.len_name = NameProxy("len")
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "Accumulator",
|
||||
__parent = _parent_0
|
||||
__name = "Accumulator"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -1348,9 +1306,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
Accumulator = _class_0
|
||||
end
|
||||
default_accumulator = function(self, node)
|
||||
|
@ -10,33 +10,21 @@ do
|
||||
end
|
||||
local LocalName
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
get_name = function(self)
|
||||
return self.name
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, name)
|
||||
self.name = name
|
||||
self[1] = "temp_name"
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "LocalName",
|
||||
__parent = _parent_0
|
||||
__name = "LocalName"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -44,14 +32,10 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
LocalName = _class_0
|
||||
end
|
||||
local NameProxy
|
||||
do
|
||||
local _parent_0 = nil
|
||||
local _base_0 = {
|
||||
get_name = function(self, scope, dont_put)
|
||||
if dont_put == nil then
|
||||
@ -106,26 +90,15 @@ do
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
if _parent_0 then
|
||||
setmetatable(_base_0, _parent_0.__base)
|
||||
end
|
||||
local _class_0 = setmetatable({
|
||||
__init = function(self, prefix)
|
||||
self.prefix = prefix
|
||||
self[1] = "temp_name"
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "NameProxy",
|
||||
__parent = _parent_0
|
||||
__name = "NameProxy"
|
||||
}, {
|
||||
__index = function(cls, name)
|
||||
local val = rawget(_base_0, name)
|
||||
if val == nil and _parent_0 then
|
||||
return _parent_0[name]
|
||||
else
|
||||
return val
|
||||
end
|
||||
end,
|
||||
__index = _base_0,
|
||||
__call = function(cls, ...)
|
||||
local _self_0 = setmetatable({}, _base_0)
|
||||
cls.__init(_self_0, ...)
|
||||
@ -133,9 +106,6 @@ do
|
||||
end
|
||||
})
|
||||
_base_0.__class = _class_0
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
NameProxy = _class_0
|
||||
end
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user