vocabs.generated: if quotation throws an exception, forget the new vocabulary

db4
Slava Pestov 2009-09-23 20:22:47 -05:00
parent 1ba83c986c
commit 27fed2746a
1 changed files with 2 additions and 2 deletions

View File

@ -1,13 +1,13 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: compiler.units fry kernel vocabs vocabs.parser ;
USING: compiler.units continuations fry kernel vocabs vocabs.parser ;
IN: vocabs.generated
: generate-vocab ( vocab-name quot -- vocab )
[ dup vocab [ ] ] dip '[
[
[
_ with-current-vocab
[ _ with-current-vocab ] [ ] [ forget-vocab ] cleanup
] with-compilation-unit
] keep
] ?if ; inline