diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-09-28 22:15:24 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-09-28 22:15:24 -0700 |
| commit | b7e768a2f826f6643e47b35272dbb35136d489b6 (patch) | |
| tree | aeec27649aabbc02dd0101b8a03be8976e73c08d /syntax_tree.lua | |
| parent | 63d8b1cd3f34b15bf86210b99209e8b57e7019bb (diff) | |
Rebuild.
Diffstat (limited to 'syntax_tree.lua')
| -rw-r--r-- | syntax_tree.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
