USING: namespaces make math math.order math.parser sequences accessors
kernel kernel.private layouts assocs words summary arrays
combinators classes.algebra alien alien.c-types alien.structs
-alien.strings alien.arrays alien.complex sets libc
+alien.strings alien.arrays alien.complex sets libc call
continuations.private fry cpu.architecture
compiler.errors
compiler.alien
dup current-callback eq? [
drop
] [
- yield-hook get call wait-to-return
+ yield-hook get call( -- ) wait-to-return
] if ;
: do-callback ( quot token -- )
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io.encodings io.backend io.ports io.streams.duplex
io splitting grouping sequences namespaces kernel
-destructors math concurrency.combinators accessors
+destructors math concurrency.combinators accessors call fry
arrays continuations quotations system vocabs.loader combinators ;
IN: io.pipes
: ?writer ( handle/f -- stream )
[ <output-port> &dispose ] [ output-stream get ] if* ;
-GENERIC: run-pipeline-element ( input-fd output-fd obj -- quot )
+GENERIC: run-pipeline-element ( input-fd output-fd obj -- result )
M: callable run-pipeline-element
[
- [ [ ?reader ] [ ?writer ] bi* ] dip with-streams*
+ [ [ ?reader ] [ ?writer ] bi* ] dip
+ '[ _ call( -- result ) ] with-streams*
] with-destructors ;
: <pipes> ( n -- pipes )
ERROR: invalid-slot-name name ;
-: parse-long-slot-name ( -- )
+: parse-long-slot-name ( -- spec )
[ scan , \ } parse-until % ] { } make ;
: parse-slot-name ( string/f -- ? )
: parse-slot-value ( -- )
scan scan-object 2array , scan {
- { f [ unexpected-eof ] }
+ { f [ \ } unexpected-eof ] }
{ "}" [ ] }
[ bad-literal-tuple ]
} case ;
: (parse-slot-values) ( -- )
parse-slot-value
scan {
- { f [ unexpected-eof ] }
+ { f [ \ } unexpected-eof ] }
{ "{" [ (parse-slot-values) ] }
{ "}" [ ] }
[ bad-literal-tuple ]
} case ;
-: parse-slot-values ( -- )
+: parse-slot-values ( -- values )
[ (parse-slot-values) ] { } make ;
: boa>tuple ( class slots -- tuple )
: with-method-definition ( method quot -- )
over current-method set call current-method off ; inline
-: (M:) ( method def -- )
+: (M:) ( -- method def )
CREATE-METHOD [ parse-definition ] with-method-definition ;
[
V{ } clone amended-use set
parse-lines
- amended-use get empty? [ print-use-hook get call ] unless
+ amended-use get empty? [ print-use-hook get assert-depth ] unless
] with-file-vocabs ;
: parsing-file ( file -- )