aboutsummaryrefslogtreecommitdiff
path: root/nomsu_tree.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-18 15:44:29 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-18 15:44:35 -0700
commit16d127abb507751808eca65108710d3de1fd3cab (patch)
tree53a78ad2e88a95048eea76426e62c05c2c5102a5 /nomsu_tree.moon
parentfc71b0331b6122c774585c3ab93e6e55978ecaf2 (diff)
Initial working version.
Diffstat (limited to 'nomsu_tree.moon')
-rw-r--r--nomsu_tree.moon3
1 files changed, 2 insertions, 1 deletions
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