diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-15 14:53:37 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-15 14:53:42 -0700 |
| commit | ae979c3718b6b472148a19f64aa3e0878e1e259d (patch) | |
| tree | 9cd0462163ad656f8d63e7386a2aec7841197909 /code_obj.lua | |
| parent | 3be20840caa484e6f07865338bac57de45765c81 (diff) | |
Minor cleanups changes.
Diffstat (limited to 'code_obj.lua')
| -rw-r--r-- | code_obj.lua | 11 |
1 files changed, 7 insertions, 4 deletions
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 |
