diff --git a/extra/ctags/ctags.factor b/extra/ctags/ctags.factor index 2ec1208df9..e8c5608375 100644 --- a/extra/ctags/ctags.factor +++ b/extra/ctags/ctags.factor @@ -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 )