prettyprint.backend: lists only print car and "~more~" for cdr.
parent
114f58d894
commit
4b45df48f8
|
@ -266,11 +266,23 @@ M: object pprint* pprint-object ;
|
||||||
M: vector pprint* pprint-object ;
|
M: vector pprint* pprint-object ;
|
||||||
M: byte-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 -- )
|
: with-extra-nesting-level ( quot -- )
|
||||||
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
|
nesting-limit [ dup [ 1 + ] [ f ] if* ] change
|
||||||
[ nesting-limit set ] curry finally ; inline
|
[ nesting-limit set ] curry finally ; inline
|
||||||
|
|
||||||
M: list pprint* pprint-object ;
|
|
||||||
M: hashtable pprint*
|
M: hashtable pprint*
|
||||||
[ pprint-object ] with-extra-nesting-level ;
|
[ pprint-object ] with-extra-nesting-level ;
|
||||||
M: curried pprint* pprint-object ;
|
M: curried pprint* pprint-object ;
|
||||||
|
|
Loading…
Reference in New Issue