From 435eae7c0ab10577431bb943a6f48873e5ecdf7c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Dec 2018 21:16:49 -0800 Subject: Some minor fixes for (type of $ast) and indexing codegen. --- syntax_tree.moon | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'syntax_tree.moon') diff --git a/syntax_tree.moon b/syntax_tree.moon index d9f9da1..2579fad 100644 --- a/syntax_tree.moon +++ b/syntax_tree.moon @@ -16,8 +16,6 @@ as_lua = => --types = {"Number", "Var", "Block", "EscapedNomsu", "Text", "List", "Dict", "DictEntry", -- "IndexChain", "Action", "FileChunks", "Error", "Comment"} class SyntaxTree - @__type: "Syntax Tree" - __tostring: => bits = [type(b) == 'string' and b\as_lua! or tostring(b) for b in *@] for k,v in pairs(@) @@ -104,6 +102,7 @@ class SyntaxTree @is_instance: (t)=> type(t) == 'table' and getmetatable(t) == @__base +SyntaxTree.__base.__type = "Syntax Tree" getmetatable(SyntaxTree).__call = (t)=> if type(t.source) == 'string' -- cgit v1.2.3