]> gitweb.factorcode.org Git - factor.git/blob - basis/specialized-arrays/prettyprint/prettyprint.factor
4d6416a1b45d25d22232ac3ed527a53d6f011bed
[factor.git] / basis / specialized-arrays / prettyprint / prettyprint.factor
1 ! Copyright (C) 2009 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel prettyprint.backend
4 prettyprint.sections prettyprint.custom
5 specialized-arrays ;
6 IN: specialized-arrays.prettyprint
7
8 : pprint-direct-array ( direct-array -- )
9     dup direct-array-syntax
10     [ [ underlying>> ] [ length>> ] bi [ pprint* ] bi@ ] pprint-prefix ;
11
12 M: specialized-array pprint*
13     [ pprint-object ] [ pprint-direct-array ] pprint-c-object ;
14