This commit is contained in:
leaf corcoran 2011-12-03 19:41:20 -08:00
parent d1059b8f98
commit 0ac471c2c4
3 changed files with 117 additions and 27 deletions

View File

@ -70,16 +70,26 @@ Line = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
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
end,
__base = _base_0,
__name = "Line",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -399,7 +409,7 @@ Block = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, parent, header, footer)
@ -418,9 +428,19 @@ Block = (function()
else
self.indent = 0
end
end
end,
__base = _base_0,
__name = "Block",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -444,7 +464,7 @@ RootBlock = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, ...)
@ -454,9 +474,19 @@ RootBlock = (function()
statement = transform.Statement:instance(self)
}
return _parent_0.__init(self, ...)
end
end,
__base = _base_0,
__name = "RootBlock",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)

View File

@ -28,7 +28,7 @@ Stack = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, ...)
@ -40,9 +40,19 @@ Stack = (function()
self:push(v)
end
return nil
end
end,
__base = _base_0,
__name = "Stack",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)

View File

@ -14,15 +14,25 @@ LocalName = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, name)
self.name = name
self[1] = "temp_name"
end
end,
__base = _base_0,
__name = "LocalName",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -91,15 +101,25 @@ NameProxy = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, prefix)
self.prefix = prefix
self[1] = "temp_name"
end
end,
__base = _base_0,
__name = "NameProxy",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -118,15 +138,25 @@ Run = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, fn)
self.fn = fn
self[1] = "run"
end
end,
__base = _base_0,
__name = "Run",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -211,15 +241,25 @@ Transformer = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self, transformers, scope)
self.transformers, self.scope = transformers, scope
self.seen_nodes = { }
end
end,
__base = _base_0,
__name = "Transformer",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
@ -946,16 +986,26 @@ Accumulator = (function()
}
_base_0.__index = _base_0
if _parent_0 then
setmetatable(_base_0, getmetatable(_parent_0).__index)
setmetatable(_base_0, _parent_0.__base)
end
local _class_0 = setmetatable({
__init = function(self)
self.accum_name = NameProxy("accum")
self.value_name = NameProxy("value")
self.len_name = NameProxy("len")
end
end,
__base = _base_0,
__name = "Accumulator",
__parent = _parent_0
}, {
__index = _base_0,
__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,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)