fix return issue

This commit is contained in:
leaf corcoran 2011-07-18 20:58:42 -07:00
parent e66af73bdb
commit 9996fec406
2 changed files with 5 additions and 4 deletions

View File

@ -200,17 +200,17 @@ Block_ = (function(_parent_0)
add = function(self, line)
local t = util.moon.type(line)
if t == "string" then
return self:add_line_text(line)
self:add_line_text(line)
elseif t == Block then
return self:add(self:line(line))
self:add(self:line(line))
elseif t == Line then
self:add_line_tables(line)
self:add_line_text(line:render())
self.current_line = self.current_line + 1
return self.current_line
else
return error("Adding unknown item")
error("Adding unknown item")
end
return nil
end,
push = function(self)
self._names = setmetatable({ }, {

View File

@ -146,6 +146,7 @@ class Block_
@current_line += 1
else
error "Adding unknown item"
nil
push: =>
@_names = setmetatable {}, { __index: @_names }