vocabs.generated: if quotation throws an exception, forget the new vocabulary
parent
1ba83c986c
commit
27fed2746a
|
@ -1,13 +1,13 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: vocabs.generated
|
||||||
|
|
||||||
: generate-vocab ( vocab-name quot -- vocab )
|
: generate-vocab ( vocab-name quot -- vocab )
|
||||||
[ dup vocab [ ] ] dip '[
|
[ dup vocab [ ] ] dip '[
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
_ with-current-vocab
|
[ _ with-current-vocab ] [ ] [ forget-vocab ] cleanup
|
||||||
] with-compilation-unit
|
] with-compilation-unit
|
||||||
] keep
|
] keep
|
||||||
] ?if ; inline
|
] ?if ; inline
|
||||||
|
|
Loading…
Reference in New Issue