From 16d127abb507751808eca65108710d3de1fd3cab Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Jun 2018 15:44:29 -0700 Subject: Initial working version. --- nomsu_tree.moon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nomsu_tree.moon') diff --git a/nomsu_tree.moon b/nomsu_tree.moon index 0c6e925..71bcff9 100644 --- a/nomsu_tree.moon +++ b/nomsu_tree.moon @@ -3,13 +3,14 @@ {:repr} = require 'utils' {:insert, :remove, :concat} = table {:Source} = require "code_obj" +unpack or= table.unpack AST = {} AST.is_syntax_tree = (n)-> type(n) == 'table' and getmetatable(n) and AST[n.type] == getmetatable(n) types = {"Number", "Var", "Block", "EscapedNomsu", "Text", "List", "Dict", "DictEntry", - "IndexChain", "Action"} + "IndexChain", "Action", "FileChunks"} for name in *types cls = {} with cls -- cgit v1.2.3