use cls_name for super access, rebuild

This commit is contained in:
leaf corcoran 2015-11-19 22:02:19 -08:00
parent 40b7ed6135
commit 66d80ed217
7 changed files with 28 additions and 17 deletions

View File

@ -58,6 +58,7 @@ format_file = function(fname, positions)
end
local CodeCoverage
do
local _class_0
local _base_0 = {
reset = function(self)
self.line_counts = create_counter()
@ -120,7 +121,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self)
return self:reset()
end,

View File

@ -52,6 +52,7 @@ local default_whitelist = Set({
})
local LinterBlock
do
local _class_0
local _parent_0 = Block
local _base_0 = {
lint_mark_used = function(self, name)
@ -120,11 +121,11 @@ do
end,
render = function(self, ...)
self:lint_check_unused()
return self.__class.__parent.render(self, ...)
return _class_0.__parent.render(self, ...)
end,
block = function(self, ...)
do
local _with_0 = self.__class.__parent.block(self, ...)
local _with_0 = _class_0.__parent.block(self, ...)
_with_0.block = self.block
_with_0.render = self.render
_with_0.get_root_block = self.get_root_block
@ -138,12 +139,12 @@ do
}
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, whitelist_globals, ...)
if whitelist_globals == nil then
whitelist_globals = default_whitelist
end
self.__class.__parent.__init(self, ...)
_class_0.__parent.__init(self, ...)
self.get_root_block = function()
return self
end

View File

@ -26,6 +26,7 @@ local mtype = util.moon.type
local indent_char = " "
local Line, DelayedLine, Lines, Block, RootBlock
do
local _class_0
local _base_0 = {
mark_pos = function(self, pos, line)
if line == nil then
@ -127,7 +128,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self)
self.posmap = { }
end,
@ -145,6 +146,7 @@ do
Lines = _class_0
end
do
local _class_0
local _base_0 = {
pos = nil,
append_list = function(self, items, delim)
@ -208,7 +210,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function() end,
__base = _base_0,
__name = "Line"
@ -224,6 +226,7 @@ do
Line = _class_0
end
do
local _class_0
local _base_0 = {
prepare = function() end,
render = function(self)
@ -232,7 +235,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, fn)
self.prepare = fn
end,
@ -250,6 +253,7 @@ do
DelayedLine = _class_0
end
do
local _class_0
local _base_0 = {
header = "do",
footer = "end",
@ -573,7 +577,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, parent, header, footer)
self.parent, self.header, self.footer = parent, header, footer
self._lines = Lines()
@ -613,6 +617,7 @@ do
Block = _class_0
end
do
local _class_0
local _parent_0 = Block
local _base_0 = {
__tostring = function(self)
@ -634,11 +639,11 @@ do
}
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, options)
self.options = options
self.root = self
return self.__class.__parent.__init(self)
return _class_0.__parent.__init(self)
end,
__base = _base_0,
__name = "RootBlock",

View File

@ -14,6 +14,7 @@ Set = function(items)
end
local Stack
do
local _class_0
local _base_0 = {
__tostring = function(self)
return "<Stack {" .. concat(self, ", ") .. "}>"
@ -34,7 +35,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, ...)
self:push(...)
return nil

View File

@ -680,8 +680,7 @@ Statement = Transformer {
@set "super", (block, chain) ->
relative_parent = {
"chain",
"self"
{"dot", "__class"}
cls_name
{"dot", "__parent"}
}
@ -729,6 +728,7 @@ Statement = Transformer {
else
relative_parent
{"declare", { cls_name }}
{"declare_glob", "*"}
parent_val and .assign_one(parent_cls_name, parent_val) or NOOP

View File

@ -4,13 +4,14 @@ local unpack
unpack = require("moonscript.util").unpack
local LocalName
do
local _class_0
local _base_0 = {
get_name = function(self)
return self.name
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, name)
self.name = name
self[1] = "temp_name"
@ -30,6 +31,7 @@ do
end
local NameProxy
do
local _class_0
local _base_0 = {
get_name = function(self, scope, dont_put)
if dont_put == nil then
@ -81,7 +83,7 @@ do
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, prefix)
self.prefix = prefix
self[1] = "temp_name"

View File

@ -5,13 +5,14 @@ do
end
local Run
do
local _class_0
local _base_0 = {
call = function(self, state)
return self.fn(state)
end
}
_base_0.__index = _base_0
local _class_0 = setmetatable({
_class_0 = setmetatable({
__init = function(self, fn)
self.fn = fn
self[1] = "run"