-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathctags
More file actions
58 lines (42 loc) · 2.06 KB
/
ctags
File metadata and controls
58 lines (42 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
###########
# Bazel #
###########
--langdef=Bazel
--languages=+Bazel
--map-Bazel=+.bazel
--map-Bazel=+(WORKSPACE)
--map-Bazel=+(BUILD)
--_fielddef-Bazel=signature,signatures
--fields-Bazel=+{signature}
--kinddef-Bazel=a,alias,"Bazel alias"
--mline-regex-Bazel=/^\s*alias\s*\((\s*name\s*=\s*("([^"]+)",|([^,]+),)|\s*actual\s*=\s*"([^"]+)",?)*/\3\4/a/{mgroup=0}{_field=signature: => \5}p"
--kinddef-Bazel=D,bazeldep,"Bazel module dependency"
--mline-regex-Bazel=/^\s*bazel_dep\s*\((\s*name\s*=\s*("([^"]+)"|([^,]+))|\s*version\s*=\s*"([^"]+)",?)*/\3/D/{mgroup=0}{_field=signature: : \5}p"
--kinddef-Bazel=b,binary,"Bazel binary target label"
--mline-regex-Bazel=/(\w+_binary(?>_\w+)?)\s*\(\s*name\s*=\s*("([^"]+)"|([^,]+)),?/\3\4/b/{mgroup=0}{_field=signature: : \1}p"
--kinddef-Bazel=L,library,"Bazel library target label"
--mline-regex-Bazel=/(\w+_library(?>_\w+)?)\s*\(\s*name\s*=\s*("([^"]+)"|([^,]+)),?/\3\4/L/{mgroup=0}{_field=signature: : \1}p"
--kinddef-Bazel=t,test,"Bazel test target label"
--mline-regex-Bazel=/(\w+_test(?>_\w+)?)\s*\(\s*name\s*=\s*("([^"]+)"|([^,]+)),?/\3\4/t/{mgroup=0}{_field=signature: : \1}p"
--kinddef-Bazel=o,other,"Bazel other target label"
--mline-regex-Bazel=/(^|\s+)((?!alias|bazel_dep|\w+_binary|\w+_library|\w+_test)\w+)\s*\(\s*name\s*=\s*("([^"]+)",|([^,]+),?)/\4/o/{mgroup=0}{_field=signature: : \2}p"
# TODO:
# The x flag ({exclusive}) should "Skip testing the other patterns if a line is matched to this pattern" - doesn't seem to work
##############
# Starlark #
##############
--langdef=Starlark{base=python}{dedicated}
--languages=+Starlark
--map-Starlark=+.bzl
--kinddef-Starlark=r,rule,"Starlark rule"
--regex-Starlark=/(\w+)\s*=\s*rule\(/\1/r/x
--kinddef-Starlark=r,rule,"Starlark symbolic macro"
--regex-Starlark=/(\w+)\s*=\s*macro\(/\1/r/x
--kinddef-Starlark=R,repositoryrule,"Starlark repository rule"
--regex-Starlark=/(\w+)\s*=\s*repository_rule\(/\1/R/x
--kinddef-Starlark=M,moduleextension,"Starlark module extension"
--regex-Starlark=/(\w+)\s*=\s*module_extension\(/\1/M/x
#########
# C++ #
#########
--exclude=compile_commands.json