Fix loader regression
parent
ce2780ad54
commit
3664f7af1b
|
@ -1,7 +1,7 @@
|
||||||
USING: arrays math parser tools.test kernel generic words
|
USING: arrays math parser tools.test kernel generic words
|
||||||
io.streams.string namespaces classes effects source-files
|
io.streams.string namespaces classes effects source-files
|
||||||
assocs sequences strings io.files definitions continuations
|
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
|
IN: parser.tests
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -461,3 +461,11 @@ must-fail-with
|
||||||
] times
|
] times
|
||||||
|
|
||||||
[ ] [ "parser" reload ] unit-test
|
[ ] [ "parser" reload ] unit-test
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
[ "this-better-not-exist" forget-vocab ] with-compilation-unit
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[
|
||||||
|
"USE: this-better-not-exist" eval
|
||||||
|
] must-fail
|
||||||
|
|
|
@ -113,7 +113,11 @@ M: string (load-vocab)
|
||||||
rethrow
|
rethrow
|
||||||
] [
|
] [
|
||||||
drop
|
drop
|
||||||
[ (load-vocab) ] with-compiler-errors
|
dup find-vocab-root [
|
||||||
|
[ (load-vocab) ] with-compiler-errors
|
||||||
|
] [
|
||||||
|
dup vocab [ drop ] [ no-vocab ] if
|
||||||
|
] if
|
||||||
] if
|
] if
|
||||||
] with-compiler-errors
|
] with-compiler-errors
|
||||||
] load-vocab-hook set-global
|
] load-vocab-hook set-global
|
||||||
|
|
|
@ -64,8 +64,7 @@ ERROR: no-vocab name ;
|
||||||
SYMBOL: load-vocab-hook ! ( name -- )
|
SYMBOL: load-vocab-hook ! ( name -- )
|
||||||
|
|
||||||
: load-vocab ( name -- vocab )
|
: load-vocab ( name -- vocab )
|
||||||
dup load-vocab-hook get call
|
dup load-vocab-hook get call vocab ;
|
||||||
dup vocab [ ] [ vocab-name no-vocab ] ?if ;
|
|
||||||
|
|
||||||
: vocabs ( -- seq )
|
: vocabs ( -- seq )
|
||||||
dictionary get keys natural-sort ;
|
dictionary get keys natural-sort ;
|
||||||
|
|
Loading…
Reference in New Issue