Fix bug with listener restarts

slava 2006-11-29 07:50:57 +00:00
parent 3ff56c2f22
commit 0fcb88e7cb
3 changed files with 24 additions and 3 deletions

View File

@ -10,7 +10,6 @@
- doesn't show #labels - doesn't show #labels
- we don't know if signal handlers run with the same stack or not - we don't know if signal handlers run with the same stack or not
- xml: chars>entities got broken - xml: chars>entities got broken
- restarts broken: \ ADD see 0 :res now its just ADD on the stack?
+ 0.88: + 0.88:

View File

@ -1,4 +1,5 @@
USING: arrays errors math parser test kernel generic words ; USING: arrays errors math parser test kernel generic words io
listener namespaces ;
IN: temporary IN: temporary
[ 1 CHAR: a ] [ 1 CHAR: a ]
@ -83,3 +84,22 @@ unit-test
[ 2 ] [ "IN: temporary : \0. 2 ; \0." eval ] unit-test [ 2 ] [ "IN: temporary : \0. 2 ; \0." eval ] unit-test
[ "IN: temporary : missing-- ( a b ) ;" eval ] unit-test-fails [ "IN: temporary : missing-- ( a b ) ;" eval ] unit-test-fails
! Test interactive parsing, restarts
[
file-vocabs
"errors" use+
[ [ + 1 2 3 4 ] ]
[
[
"cont" set
[
"\ + 1 2 3 4"
<string-reader> <interactive-stream>
parse-interactive "cont" get continue-with
] catch
"0 :res" eval
] callcc1
] unit-test
] with-scope

View File

@ -28,7 +28,9 @@ C: interactive-stream ( stream -- stream )
] if ; ] if ;
M: interactive-stream parse-interactive M: interactive-stream parse-interactive
[ V{ f } clone (parse-interactive) ] with-parser ; [
[ V{ f } clone (parse-interactive) ] with-parser in get
] with-scope in set ;
M: duplex-stream parse-interactive M: duplex-stream parse-interactive
duplex-stream-in parse-interactive ; duplex-stream-in parse-interactive ;