aboutsummaryrefslogtreecommitdiff
path: root/nomsu_tree.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-22 13:48:44 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-22 13:48:44 -0700
commit01d5f810ed7fd6e9b261b1fe793f8666970b2068 (patch)
tree1b8ff8f15c8bd940e724ad32dd7bc9c8cd1115d6 /nomsu_tree.lua
parente408891abf96cf1a89feeef2e91ffbefd6cc5937 (diff)
Committing built lua files.
Diffstat (limited to 'nomsu_tree.lua')
-rw-r--r--nomsu_tree.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/nomsu_tree.lua b/nomsu_tree.lua
index bbb12ab..64b4efc 100644
--- a/nomsu_tree.lua
+++ b/nomsu_tree.lua
@@ -100,6 +100,17 @@ for _index_0 = 1, #types do
end
return replacement
end
+ cls.__eq = function(self, other)
+ if type(self) ~= type(other) or #self ~= #other or getmetatable(self) ~= getmetatable(other) then
+ return false
+ end
+ for i = 1, #self do
+ if self[i] ~= other[i] then
+ return false
+ end
+ end
+ return true
+ end
end
AST[name] = setmetatable(cls, {
__tostring = function(self)