mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
fix return issue
This commit is contained in:
parent
e66af73bdb
commit
9996fec406
@ -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({ }, {
|
||||
|
@ -146,6 +146,7 @@ class Block_
|
||||
@current_line += 1
|
||||
else
|
||||
error "Adding unknown item"
|
||||
nil
|
||||
|
||||
push: =>
|
||||
@_names = setmetatable {}, { __index: @_names }
|
||||
|
Loading…
Reference in New Issue
Block a user