diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 10:59:10 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 11:00:32 +0000 |
| commit | 1b6da2babfc65c4b8f6f7ac8644c0498e094bab7 (patch) | |
| tree | 61ef0fc20c511cd8936e6af2d889a2ffddab9211 /scope.moon | |
| parent | fix error handling again (diff) | |
| download | alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.tar.gz alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.zip | |
Forward references
Diffstat (limited to 'scope.moon')
| -rw-r--r-- | scope.moon | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |
