functors2: Redo FROM: for same-functors. Execute top-level code from functors, too.

modern-harvey2
Doug Coleman 2017-12-26 11:49:20 -08:00
parent d6c834cea9
commit 38e93e9308
1 changed files with 5 additions and 3 deletions

View File

@ -89,9 +89,10 @@ ERROR: not-all-unique seq ;
] [
[
[
dup { [ word? ] [ string? ] } 1|| [
! dup { [ word? ] [ string? ] } 1|| [
dup { [ word? ] } 1|| [
[ dup word? [ vocabulary>> ] [ drop current-vocab name>> ] if ] [ dup word? [ name>> ] when ] bi
" => " glue "FROM: " " ;\n" surround drop ""
" => " glue "FROM: " " ;\n" surround
] [
drop ""
] if
@ -108,7 +109,8 @@ ERROR: not-all-unique seq ;
'[
! parse-stream forgets the previous vocab if same name
@ over '[
_ _ drop string-lines parse-lines drop
_ _ drop string-lines parse-lines
call( -- ) ! call the top-level code returned from parse-lines
] nip call ! generate-vocab use-vocab
]
] dip