Fixing some stack comments

db4
Slava Pestov 2009-03-16 06:17:18 -05:00
parent 1559b74640
commit 38c6be94d4
5 changed files with 13 additions and 12 deletions
basis
compiler/codegen
io/pipes
core
classes/tuple/parser
generic/parser

View File

@ -3,7 +3,7 @@
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
@ -464,7 +464,7 @@ TUPLE: callback-context ;
dup current-callback eq? [
drop
] [
yield-hook get call wait-to-return
yield-hook get call( -- ) wait-to-return
] if ;
: do-callback ( quot token -- )

View File

@ -1,8 +1,8 @@
! 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
@ -29,11 +29,12 @@ HOOK: (pipe) io-backend ( -- pipe )
: ?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 )

View File

@ -30,7 +30,7 @@ ERROR: duplicate-slot-names names ;
ERROR: invalid-slot-name name ;
: parse-long-slot-name ( -- )
: parse-long-slot-name ( -- spec )
[ scan , \ } parse-until % ] { } make ;
: parse-slot-name ( string/f -- ? )
@ -64,7 +64,7 @@ ERROR: bad-literal-tuple ;
: parse-slot-value ( -- )
scan scan-object 2array , scan {
{ f [ unexpected-eof ] }
{ f [ \ } unexpected-eof ] }
{ "}" [ ] }
[ bad-literal-tuple ]
} case ;
@ -72,13 +72,13 @@ ERROR: bad-literal-tuple ;
: (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 )

View File

@ -18,6 +18,6 @@ SYMBOL: current-method
: 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 ;

View File

@ -214,7 +214,7 @@ print-use-hook [ [ ] ] initialize
[
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 -- )