aboutsummaryrefslogtreecommitdiffstats
path: root/scope.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-03 10:59:10 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-03 11:00:32 +0000
commit1b6da2babfc65c4b8f6f7ac8644c0498e094bab7 (patch)
tree61ef0fc20c511cd8936e6af2d889a2ffddab9211 /scope.moon
parentfix error handling again (diff)
downloadalive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.tar.gz
alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.zip
Forward references
Diffstat (limited to 'scope.moon')
-rw-r--r--scope.moon8
1 files changed, 6 insertions, 2 deletions
diff --git a/scope.moon b/scope.moon
index 01f479b..7378dd5 100644
--- a/scope.moon
+++ b/scope.moon
@@ -8,7 +8,7 @@ class Scope
set_raw: (key, val) => @values[key] = Const.wrap val, key
set: (key, val) =>
- L\trace "setting #{key} = #{val}"
+ L\trace "setting #{key} = #{val} in #{@}"
@values[key] = val
get: (key, prefix='') =>
@@ -45,7 +45,11 @@ class Scope
parent = parent.parent
buf ..= " ^#{depth}" if depth != 0
- buf ..= " [#{table.concat [key for key in pairs @values], ', '}]"
+ keys = [key for key in pairs @values]
+ if #keys > 5
+ keys = [key for key in *keys[,5]]
+ keys[6] = '...'
+ buf ..= " [#{table.concat keys, ', '}]"
buf ..= ">"
buf