]> gitweb.factorcode.org Git - factor.git/blob - basis/struct-arrays/prettyprint/prettyprint.factor
change math.floats.env tests not to use any libm functions, which don't reliably...
[factor.git] / basis / struct-arrays / prettyprint / prettyprint.factor
1 ! (c)Joe Groff bsd license
2 USING: accessors arrays kernel prettyprint.backend
3 prettyprint.custom prettyprint.sections sequences struct-arrays ;
4 IN: struct-arrays.prettyprint
5
6 M: struct-array pprint-delims
7     drop \ struct-array{ \ } ;
8
9 M: struct-array >pprint-sequence
10     [ >array ] [ class>> ] bi prefix ;
11
12 : pprint-struct-array-pointer ( struct-array -- )
13     \ struct-array@ 
14     [ [ class>> pprint-word ] [ underlying>> pprint* ] [ length>> pprint* ] tri ]
15     pprint-prefix ;
16
17 M: struct-array pprint*
18     [ pprint-object ]
19     [ pprint-struct-array-pointer ] pprint-c-object ;
20