diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-24 21:16:51 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-24 21:17:15 -0700 |
| commit | 64294f5cd6ab67236625cf4d645debafc35d0055 (patch) | |
| tree | db469d2e94f4d8479d02e7a390941c122025b423 /nomsu_tree.moon | |
| parent | d9b795ee45d7a3c65bdd74da5ee042fac12cf5b8 (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.moon | 9 |
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 |
