From ae979c3718b6b472148a19f64aa3e0878e1e259d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 15 May 2018 14:53:37 -0700 Subject: Minor cleanups changes. --- code_obj.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'code_obj.lua') diff --git a/code_obj.lua b/code_obj.lua index 4c9eac0..2e1ce5e 100644 --- a/code_obj.lua +++ b/code_obj.lua @@ -262,7 +262,7 @@ do end self.__str = nil end, - convert_to_statements = function(self, prefix, suffix) + as_statements = function(self, prefix, suffix) if prefix == nil then prefix = "" end @@ -270,14 +270,17 @@ do suffix = ";" end if not (self.is_value) then - return + return self end + local statements = Lua(self.source) if prefix ~= "" then - self:prepend(prefix) + statements:append(prefix) end + statements:append(self) if suffix ~= "" then - return self:append(suffix) + statements:append(suffix) end + return statements end, declare_locals = function(self, to_declare) if to_declare == nil then -- cgit v1.2.3