2009-08-26 19:22:51 -04:00
|
|
|
! (c)Joe Groff bsd license
|
|
|
|
USING: accessors arrays kernel prettyprint.backend
|
2009-08-30 22:12:02 -04:00
|
|
|
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 -- )
|
2009-08-30 22:12:02 -04:00
|
|
|
<block
|
2009-08-30 22:05:21 -04:00
|
|
|
\ struct-array@ pprint-word
|
2009-08-30 22:12:02 -04:00
|
|
|
[ 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
|
|
|
|