rebuilt lua with class updates

This commit is contained in:
leaf corcoran 2011-10-01 22:34:47 -07:00
parent 5d76a8d741
commit 570cf1f8cb
3 changed files with 37 additions and 31 deletions

View File

@ -22,7 +22,8 @@ local bubble_names = {
"has_varargs" "has_varargs"
} }
local Line local Line
Line = (function(_parent_0) Line = (function()
local _parent_0 = nil
local _base_0 = { local _base_0 = {
_append_single = function(self, item) _append_single = function(self, item)
if util.moon.type(item) == Line then if util.moon.type(item) == Line then
@ -85,17 +86,18 @@ Line = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0
return _class_0 return _class_0
end)() end)()
local Block_ local Block_
Block_ = (function(_parent_0) Block_ = (function()
local _parent_0 = nil
local _base_0 = { local _base_0 = {
header = "do", header = "do",
footer = "end", footer = "end",
@ -446,17 +448,18 @@ Block_ = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0
return _class_0 return _class_0
end)() end)()
local RootBlock local RootBlock
RootBlock = (function(_parent_0) RootBlock = (function()
local _parent_0 = Block_
local _base_0 = { local _base_0 = {
render = function(self) render = function(self)
self:_insert_breaks() self:_insert_breaks()
@ -475,15 +478,15 @@ RootBlock = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0
return _class_0 return _class_0
end)(Block_) end)()
Block = Block_ Block = Block_
format_error = function(msg, pos, file_str) format_error = function(msg, pos, file_str)
local line = pos_to_line(file_str, pos) local line = pos_to_line(file_str, pos)

View File

@ -11,7 +11,8 @@ Set = function(items)
end end
return self return self
end end
Stack = (function(_parent_0) Stack = (function()
local _parent_0 = nil
local _base_0 = { local _base_0 = {
__tostring = function(self) __tostring = function(self)
return "<Stack {" .. concat(self, ", ") .. "}>" return "<Stack {" .. concat(self, ", ") .. "}>"
@ -46,10 +47,10 @@ Stack = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0

View File

@ -4,7 +4,8 @@ local util = require("moonscript.util")
local data = require("moonscript.data") local data = require("moonscript.data")
local ntype, build, smart_node = types.ntype, types.build, types.smart_node local ntype, build, smart_node = types.ntype, types.build, types.smart_node
local insert = table.insert local insert = table.insert
NameProxy = (function(_parent_0) NameProxy = (function()
local _parent_0 = nil
local _base_0 = { local _base_0 = {
get_name = function(self, scope) get_name = function(self, scope)
if not self.name then if not self.name then
@ -64,17 +65,18 @@ NameProxy = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0
return _class_0 return _class_0
end)() end)()
local Run local Run
Run = (function(_parent_0) Run = (function()
local _parent_0 = nil
local _base_0 = { local _base_0 = {
call = function(self, state) call = function(self, state)
return self.fn(state) return self.fn(state)
@ -91,10 +93,10 @@ Run = (function(_parent_0)
end end
}, { }, {
__index = _base_0, __index = _base_0,
__call = function(mt, ...) __call = function(cls, ...)
local self = setmetatable({}, _base_0) local _self_0 = setmetatable({}, _base_0)
mt.__init(self, ...) cls.__init(_self_0, ...)
return self return _self_0
end end
}) })
_base_0.__class = _class_0 _base_0.__class = _class_0