1CTAGS-LANG-JULIA(7)             Universal-ctags            CTAGS-LANG-JULIA(7)
2
3
4

NAME

6       ctags-lang-julia  -  Random  notes about tagging Julia source code with
7       Universal-ctags
8

SYNOPSIS

10       ctags ... --languages=+Julia ...
11       ctags ... --language-force=Julia ...
12       ctags ... --map-Julia=+.jl ...
13
14

DESCRIPTION

16       This man page gathers random notes about tagging Julia source code.
17

TAGGING IMPORT AND USING EXPRESSIONS

19   Summary
20       using X
21
22                       ┌─────┬────────┬──────┬──────────────────┐
23                       │name │ kind   │ role │ other noticeable │
24                       │     │        │      │ fields           │
25                       ├─────┼────────┼──────┼──────────────────┤
26                       │X    │ module │ used │ N/A              │
27                       └─────┴────────┴──────┴──────────────────┘
28
29       using X: a, b
30
31                    ┌─────┬─────────┬───────────┬──────────────────┐
32                    │name │ kind    │ role      │ other noticeable │
33                    │     │         │           │ fields           │
34                    ├─────┼─────────┼───────────┼──────────────────┤
35                    │X    │ module  │ namespace │ N/A              │
36                    ├─────┼─────────┼───────────┼──────────────────┤
37                    │a, b │ unknown │ used      │ scope:module:X   │
38                    └─────┴─────────┴───────────┴──────────────────┘
39
40       import X
41
42                     ┌─────┬────────┬──────────┬──────────────────┐
43                     │name │ kind   │ role     │ other noticeable │
44                     │     │        │          │ fields           │
45                     ├─────┼────────┼──────────┼──────────────────┤
46                     │X    │ module │ imported │ N/A              │
47                     └─────┴────────┴──────────┴──────────────────┘
48
49       import X.a, Y.b
50
51                    ┌─────┬─────────┬───────────┬──────────────────┐
52                    │name │ kind    │ role      │ other noticeable │
53                    │     │         │           │ fields           │
54                    ├─────┼─────────┼───────────┼──────────────────┤
55                    │X, Y │ module  │ namespace │ N/A              │
56                    ├─────┼─────────┼───────────┼──────────────────┤
57                    │a    │ unknown │ imported  │ scope:module:X   │
58                    ├─────┼─────────┼───────────┼──────────────────┤
59                    │b    │ unknown │ imported  │ scope:module:Y   │
60                    └─────┴─────────┴───────────┴──────────────────┘
61
62       import X: a, b
63
64
65
66
67                    ┌─────┬─────────┬───────────┬──────────────────┐
68                    │name │ kind    │ role      │ other noticeable │
69                    │     │         │           │ fields           │
70                    ├─────┼─────────┼───────────┼──────────────────┤
71                    │X    │ module  │ namespace │ N/A              │
72                    ├─────┼─────────┼───────────┼──────────────────┤
73                    │a,b  │ unknown │ imported  │ scope:module:X   │
74                    └─────┴─────────┴───────────┴──────────────────┘
75
76   Examples
77       "input.jl"
78
79          using X0
80
81       "output.tags"  with  "--options=NONE -o - --extras=+r --fields=+rzK in‐
82       put.jl"
83
84          X0      input.jl        /^using X0$/;"  kind:module     roles:used
85
86       --extras=+r (or --extras=+{reference}) option is needed for  this  tag,
87       since  it's  a  reference  tag. This is because module X is not defined
88       here.  It  is  defined  in  another  file.  Enable  roles:  field  with
89       --fields=+r is for recording that the module is "used", i.e., loaded by
90       using.
91
92       "input.jl"
93
94          import X1.a, X2.b, X3
95
96       "output.tags" with "--options=NONE -o - --extras=+r --fields=+rzKZ  in‐
97       put.jl"
98
99          X1      input.jl        /^import X1.a, X2.b, X3$/;"     kind:module     roles:namespace
100          X2      input.jl        /^import X1.a, X2.b, X3$/;"     kind:module     roles:namespace
101          X3      input.jl        /^import X1.a, X2.b, X3$/;"     kind:module     roles:imported
102          a       input.jl        /^import X1.a, X2.b, X3$/;"     kind:unknown    scope:module:X1 roles:imported
103          b       input.jl        /^import X1.a, X2.b, X3$/;"     kind:unknown    scope:module:X2 roles:imported
104
105       Why  X1  and  X2  have role "namespace", while X3 have role "imported"?
106       It's because the symbol a in module X1, and b in module X2 are  brought
107       to  the  current scope, but X1 and X2 themselves are not. We use "name‐
108       space" role for such modules.
109
110       X3 is different. The symbol X3, together with all exported  symbols  in
111       X3, is brought to current scope. For such modules, we use "imported" or
112       "used" role depending whether they are loaded by import or using.
113
114       Also, notice that a and b have the "unknown" kind. This is  because  we
115       cannot know whether it's a function, constant, or macro, etc.
116

SEE ALSO

118       ctags(1), ctags-client-tools(7)
119
120
121
122
1235.9.0                                                      CTAGS-LANG-JULIA(7)
Impressum