Added some helper functions that may be used both in ctags and etags

db4
Alfredo Beaumont 2008-07-13 17:05:41 +02:00
parent ca781ea739
commit 6c5e73898f
1 changed files with 12 additions and 3 deletions
extra/ctags

View File

@ -9,13 +9,22 @@ io.encodings.ascii math.parser vocabs definitions
namespaces words sorting ;
IN: ctags
: ctag-word ( ctag -- word )
first ;
: ctag-path ( ctag -- path )
second first ;
: ctag-lineno ( ctag -- n )
second second ;
: ctag ( seq -- str )
[
dup first ?word-name %
dup ctag-word ?word-name %
"\t" %
second dup first normalize-path %
dup ctag-path normalize-path %
"\t" %
second number>string %
ctag-lineno number>string %
] "" make ;
: ctag-strings ( seq1 -- seq2 )