aboutsummaryrefslogtreecommitdiff
path: root/nomsu_tree.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-24 21:16:51 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-24 21:17:15 -0700
commit64294f5cd6ab67236625cf4d645debafc35d0055 (patch)
treedb469d2e94f4d8479d02e7a390941c122025b423 /nomsu_tree.moon
parentd9b795ee45d7a3c65bdd74da5ee042fac12cf5b8 (diff)
Removed the Word tree type and replaced it with raw strings, since
they're only used as part of Actions
Diffstat (limited to 'nomsu_tree.moon')
-rw-r--r--nomsu_tree.moon9
1 files changed, 4 insertions, 5 deletions
diff --git a/nomsu_tree.moon b/nomsu_tree.moon
index 2f7c202..e261306 100644
--- a/nomsu_tree.moon
+++ b/nomsu_tree.moon
@@ -56,7 +56,6 @@ Tree "Dict", 'multi'
Tree "DictEntry", 'multi'
Tree "IndexChain", 'multi'
Tree "Number", 'single'
-Tree "Word", 'single'
Tree "Comment", 'single'
Tree "Var", 'single',
@@ -65,9 +64,9 @@ Tree "Var", 'single',
Tree "Action", 'multi',
get_stub: (include_names=false)=>
- bits = if include_names
- [(t.type == "Word" and t.value or "%#{t.value}") for t in *@]
- else [(t.type == "Word" and t.value or "%") for t in *@]
- return concat(bits, " ")
+ if include_names
+ concat [type(a) == "string" and a or "%#{a.value}" for a in *@], " "
+ else
+ concat [type(a) == "string" and a or "%" for a in *@], " "
return Types