prettyprint.backend: lists only print car and "~more~" for cdr.

clean-macosx-x86-64
John Benediktsson 2019-10-16 10:01:56 -07:00
parent 114f58d894
commit 4b45df48f8
1 changed files with 13 additions and 1 deletions

View File

@ -266,11 +266,23 @@ M: object pprint* pprint-object ;
M: vector pprint* pprint-object ;
M: byte-vector pprint* pprint-object ;
M: list pprint*
[
<flow
dup pprint-delims [
pprint-word
dup pprint-narrow? <inset
dup nil? [ drop ] [
[ car pprint* ]
[ cdr nil? [ "~more~" text ] unless ] bi
] if block>
] dip pprint-word block>
] check-recursion ;
: with-extra-nesting-level ( quot -- )
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
[ nesting-limit set ] curry finally ; inline
M: list pprint* pprint-object ;
M: hashtable pprint*
[ pprint-object ] with-extra-nesting-level ;
M: curried pprint* pprint-object ;