From b7e768a2f826f6643e47b35272dbb35136d489b6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Sep 2018 22:15:24 -0700 Subject: Rebuild. --- syntax_tree.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'syntax_tree.lua') diff --git a/syntax_tree.lua b/syntax_tree.lua index afdb631..851711a 100644 --- a/syntax_tree.lua +++ b/syntax_tree.lua @@ -11,7 +11,7 @@ AST.is_syntax_tree = function(n, t) if t == nil then t = nil end - return type(n) == 'table' and getmetatable(n) and AST[n.type] == getmetatable(n) and (t == nil or n.type == t) + return type(n) == 'table' and getmetatable(n) and getmetatable(n).__type == "Syntax Tree" and (t == nil or n.type == t) end local as_lua as_lua = function(self) @@ -54,6 +54,7 @@ for _index_0 = 1, #types do cls.__index = cls cls.__name = name cls.type = name + cls.__type = "Syntax Tree" cls.is_instance = function(self, x) return getmetatable(x) == self end -- cgit v1.2.3