From 64294f5cd6ab67236625cf4d645debafc35d0055 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 24 May 2018 21:16:51 -0700 Subject: Removed the Word tree type and replaced it with raw strings, since they're only used as part of Actions --- nomsu_tree.moon | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'nomsu_tree.moon') 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 -- cgit v1.2.3