Merge branch 'master' of git://factorcode.org/git/factor

Slava Pestov 2008-03-20 19:55:51 -05:00
commit 25192e35d3
4 changed files with 16 additions and 5 deletions

View File

@ -1,7 +1,7 @@
USING: arrays math parser tools.test kernel generic words
io.streams.string namespaces classes effects source-files
assocs sequences strings io.files definitions continuations
sorting tuples compiler.units debugger vocabs.loader ;
sorting tuples compiler.units debugger vocabs vocabs.loader ;
IN: parser.tests
[
@ -461,3 +461,11 @@ must-fail-with
] times
[ ] [ "parser" reload ] unit-test
[ ] [
[ "this-better-not-exist" forget-vocab ] with-compilation-unit
] unit-test
[
"USE: this-better-not-exist" eval
] must-fail

View File

@ -113,7 +113,11 @@ M: string (load-vocab)
rethrow
] [
drop
[ (load-vocab) ] with-compiler-errors
dup find-vocab-root [
[ (load-vocab) ] with-compiler-errors
] [
dup vocab [ drop ] [ no-vocab ] if
] if
] if
] with-compiler-errors
] load-vocab-hook set-global

View File

@ -64,8 +64,7 @@ ERROR: no-vocab name ;
SYMBOL: load-vocab-hook ! ( name -- )
: load-vocab ( name -- vocab )
dup load-vocab-hook get call
dup vocab [ ] [ vocab-name no-vocab ] ?if ;
dup load-vocab-hook get call vocab ;
: vocabs ( -- seq )
dictionary get keys natural-sort ;

View File

@ -3,7 +3,7 @@ USING: kernel words namespaces classes parser continuations
io io.files io.launcher io.sockets
math math.parser
combinators sequences splitting quotations arrays strings tools.time
sequences.deep new-slots accessors assocs.lib
sequences.deep accessors assocs.lib
io.encodings.utf8
combinators.cleave bake calendar calendar.format ;