aboutsummaryrefslogtreecommitdiffstats
path: root/scope.moon
diff options
context:
space:
mode:
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