factor/basis/struct-arrays/prettyprint/prettyprint.factor

22 lines
586 B
Factor
Raw Normal View History

2009-08-26 19:22:51 -04:00
! (c)Joe Groff bsd license
USING: accessors arrays kernel prettyprint.backend
prettyprint.custom prettyprint.sections sequences struct-arrays ;
2009-08-26 19:09:02 -04:00
IN: struct-arrays.prettyprint
2009-08-26 19:22:51 -04:00
M: struct-array pprint-delims
drop \ struct-array{ \ } ;
M: struct-array >pprint-sequence
[ >array ] [ class>> ] bi prefix ;
2009-08-30 22:05:21 -04:00
: pprint-struct-array-pointer ( struct-array -- )
<block
2009-08-30 22:05:21 -04:00
\ struct-array@ pprint-word
[ class>> ] [ underlying>> ] [ length>> ] tri [ pprint* ] tri@
block> ;
2009-08-30 22:05:21 -04:00
M: struct-array pprint*
[ pprint-object ]
[ pprint-struct-array-pointer ] pprint-c-object ;
2009-08-26 19:22:51 -04:00