see STRUCT: definitions as STRUCT: definitions

db4
Joe Groff 2009-08-12 10:37:09 -04:00
parent 4461a63e1d
commit 940fbd5ace
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,11 @@
! (c)Joe Groff bsd license
USING: classes.struct kernel prettyprint.backend
prettyprint.sections see.private sequences words ;
IN: classes.struct.prettyprint
M: struct-class see-class*
<colon \ STRUCT: pprint-word dup pprint-word
<block "struct-slots" word-prop [ pprint-slot ] each
block> pprint-; block> ;

View File

@ -17,7 +17,7 @@ STRUCT: bar
[ 123 ] [ bar new foo>> y>> ] unit-test
[ 1 2 3 t ] [
1 2 3 t foo boa bar boa
1 2 3 t foo boa bar boa
{
[ w>> ]
[ foo>> x>> ]

View File

@ -132,3 +132,6 @@ M: struct-class heap-size
SYNTAX: STRUCT:
parse-struct-definition define-struct-class ;
USING: vocabs vocabs.loader ;
"prettyprint" vocab [ "classes.struct.prettyprint" require ] when