: parse-struct-slots ( slots -- slots' more? )
scan {
{ ";" [ f ] }
- { "{" [ parse-struct-slot over push t ] }
+ { "{" [ parse-struct-slot suffix! t ] }
{ f [ unexpected-eof ] }
[ invalid-struct-slot ]
} case ;
: parse-struct-slot` ( accum -- accum )
scan-string-param scan-c-type` \ } parse-until
- [ <struct-slot-spec> over push ] 3curry over push-all ;
+ [ <struct-slot-spec> suffix! ] 3curry append! ;
: parse-struct-slots` ( accum -- accum more? )
scan {
FUNCTOR-SYNTAX: STRUCT:
scan-param suffix!
- [ 8 <vector> ] over push-all
+ [ 8 <vector> ] append!
[ parse-struct-slots` ] [ ] while
- [ >array define-struct-class ] over push-all ;
+ [ >array define-struct-class ] append! ;
USING: vocabs vocabs.loader ;