diff options
Diffstat (limited to 'nomsu_tree.lua')
| -rw-r--r-- | nomsu_tree.lua | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/nomsu_tree.lua b/nomsu_tree.lua index 25fef75..b42fe52 100644 --- a/nomsu_tree.lua +++ b/nomsu_tree.lua @@ -13,18 +13,6 @@ do local _obj_0 = require("lua_obj") Lua, Location = _obj_0.Lua, _obj_0.Location end -local common_methods = { - __tostring = function(self) - return tostring(self.name) .. "(" .. tostring(repr(self.value)) .. ")" - end, - with_value = function(self, value) - return getmetatable(self)(value, self.source) - end -} -local fields = { - "value", - "source" -} local Types = { } Types.DictEntry = immutable({ "key", @@ -39,7 +27,7 @@ local Tree Tree = function(name, methods) do methods.__tostring = function(self) - return tostring(self.name) .. "(" .. tostring(repr(self.value)) .. ")" + return tostring(self.name) .. "(" .. tostring(repr(self.value)) .. ", " .. tostring(repr(self.source)) .. ")" end methods.with_value = function(self, value) return getmetatable(self)(value, self.source) |
