]> gitweb.factorcode.org Git - factor.git/blob - extra/ctags/ctags-docs.factor
Remove stack effects from HELP: declarations.
[factor.git] / extra / ctags / ctags-docs.factor
1 USING: help.syntax help.markup kernel prettyprint sequences strings words math ;
2 IN: ctags
3
4 ARTICLE: "ctags" "Ctags file"
5 { $emphasis "ctags" } " generates a index file of every factor word in ctags format as supported by vi and other editors. More information can be found at " { $url "http://en.wikipedia.org/wiki/Ctags" } "."
6 { $subsections
7     ctags
8     ctags-write
9     ctag-strings
10     ctag
11     ctag-word
12     ctag-path
13     ctag-lineno
14 } ;
15
16 HELP: ctags
17 { $values { "path" "a pathname string" } }
18 { $description "Generates a index file in ctags format and stores in " { $snippet "path" } "." }
19 { $examples
20   { $unchecked-example
21     "USING: ctags ;"
22     "\"tags\" ctags"
23     ""
24   }
25 } ;
26
27 HELP: ctags-write
28 { $values { "seq" sequence }
29           { "path" "a pathname string" } }
30 { $description "Stores a " { $snippet "alist" } " in " { $snippet "path" } ". " { $snippet "alist" } " must be an association list with ctags format: key must be a valid word and value a sequence whose first element is a resource name and second element is a line number" }
31 { $examples
32   { $unchecked-example
33     "USING: kernel ctags ;"
34     "{ { if  { \"resource:extra/unix/unix.factor\" 91 } } } \"tags\" ctags-write"
35     ""
36   }
37 }
38 { $notes
39   { $snippet "tags" } " file will contain a single line: if\\t/path/to/factor/extra/unix/unix.factor\\t91" } ;
40
41 HELP: ctag-strings
42 { $values { "alist" "an association list" }
43           { "seq" sequence } }
44 { $description "Converts an " { $snippet "alist" } " with ctag format (a word as key and a sequence whose first element is a resource name and a second element is a line number as value) in a " { $snippet "seq" } " of ctag strings." }
45 { $examples
46   { $unchecked-example
47     "USING: kernel ctags prettyprint ;"
48     "{ { if  { \"resource:extra/unix/unix.factor\" 91 } } } ctag-strings ."
49     "{ \"if\\t/path/to/factor/extra/unix/unix.factor\\t91\" }"
50   }
51 } ;
52
53 HELP: ctag
54 { $values { "seq" sequence }
55           { "str" string } }
56 { $description "Outputs a string " { $snippet "str" } " in ctag format for sequence with two elements, first one must be a valid word and second one a sequence whose first element is a resource name and second element is a line number" }
57 { $examples
58   { $unchecked-example
59     "USING: kernel ctags prettyprint ;"
60     "{ if  { \"resource:extra/unix/unix.factor\" 91 } } ctag ."
61     "\"if\\t/path/to/factor/extra/unix/unix.factor\\t91\""
62   }
63 } ;
64
65 HELP: ctag-lineno
66 { $values { "ctag" sequence }
67           { "n" integer } }
68 { $description "Provides de line number " { $snippet "n" } " from a sequence in ctag format " }
69 { $examples
70   { $example
71     "USING: kernel ctags prettyprint ;"
72     "{ if  { \"resource:extra/unix/unix.factor\" 91 } } ctag-lineno ."
73     "91"
74   }
75 } ;
76
77 HELP: ctag-path
78 { $values { "ctag" sequence }
79           { "path" string } }
80 { $description "Provides a path string " { $snippet "path" } " from a sequence in ctag format" }
81 { $examples
82   { $example
83     "USING: kernel ctags prettyprint ;"
84     "{ if  { \"resource:extra/unix/unix.factor\" 91 } } ctag-path ."
85     "\"resource:extra/unix/unix.factor\""
86   }
87 } ;
88
89 HELP: ctag-word
90 { $values { "ctag" sequence }
91           { "word" word } }
92 { $description "Provides the " { $snippet "word" } " from a sequence in ctag format " }
93 { $examples
94   { $example
95     "USING: kernel ctags prettyprint ;"
96     "{ if  { \"resource:extra/unix/unix.factor\" 91 } } ctag-word ."
97     "if"
98   }
99 } ;
100
101
102 ABOUT: "ctags"