Some improvements both in elegance and performance in ctags vocab
parent
4cb68c4a4d
commit
5a1ab1edae
|
@ -19,19 +19,17 @@ IN: ctags
|
||||||
] "" make ;
|
] "" make ;
|
||||||
|
|
||||||
: ctag-strings ( seq1 -- seq2 )
|
: ctag-strings ( seq1 -- seq2 )
|
||||||
{ } swap [ ctag suffix ] each ;
|
[ ctag ] map ;
|
||||||
|
|
||||||
: ctags-write ( seq path -- )
|
: ctags-write ( seq path -- )
|
||||||
[ ctag-strings ] dip ascii set-file-lines ;
|
[ ctag-strings ] dip ascii set-file-lines ;
|
||||||
|
|
||||||
: (ctags) ( -- seq )
|
: (ctags) ( -- seq )
|
||||||
{ } all-words [
|
all-words [
|
||||||
dup where [
|
dup where [
|
||||||
2array suffix
|
2array
|
||||||
] [
|
] when*
|
||||||
drop
|
] map [ sequence? ] filter ;
|
||||||
] if*
|
|
||||||
] each ;
|
|
||||||
|
|
||||||
: ctags ( path -- )
|
: ctags ( path -- )
|
||||||
(ctags) sort-keys swap ctags-write ;
|
(ctags) sort-keys swap ctags-write ;
|
Loading…
Reference in New Issue