see STRUCT: definitions as STRUCT: definitions
parent
4461a63e1d
commit
940fbd5ace
|
@ -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> ;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ STRUCT: bar
|
||||||
[ 123 ] [ bar new foo>> y>> ] unit-test
|
[ 123 ] [ bar new foo>> y>> ] unit-test
|
||||||
|
|
||||||
[ 1 2 3 t ] [
|
[ 1 2 3 t ] [
|
||||||
1 2 3 t foo boa bar boa
|
1 2 3 t foo boa bar boa
|
||||||
{
|
{
|
||||||
[ w>> ]
|
[ w>> ]
|
||||||
[ foo>> x>> ]
|
[ foo>> x>> ]
|
||||||
|
|
|
@ -132,3 +132,6 @@ M: struct-class heap-size
|
||||||
SYNTAX: STRUCT:
|
SYNTAX: STRUCT:
|
||||||
parse-struct-definition define-struct-class ;
|
parse-struct-definition define-struct-class ;
|
||||||
|
|
||||||
|
USING: vocabs vocabs.loader ;
|
||||||
|
|
||||||
|
"prettyprint" vocab [ "classes.struct.prettyprint" require ] when
|
||||||
|
|
Loading…
Reference in New Issue