Some improvements both in elegance and performance in ctags vocab

db4
Alfredo Beaumont 2008-07-11 16:16:01 +02:00
parent 4cb68c4a4d
commit 5a1ab1edae
1 changed files with 5 additions and 7 deletions

View File

@ -19,19 +19,17 @@ IN: ctags
] "" make ;
: ctag-strings ( seq1 -- seq2 )
{ } swap [ ctag suffix ] each ;
[ ctag ] map ;
: ctags-write ( seq path -- )
[ ctag-strings ] dip ascii set-file-lines ;
: (ctags) ( -- seq )
{ } all-words [
all-words [
dup where [
2array suffix
] [
drop
] if*
] each ;
2array
] when*
] map [ sequence? ] filter ;
: ctags ( path -- )
(ctags) sort-keys swap ctags-write ;