aboutsummaryrefslogtreecommitdiffstats
path: root/queries/rst/locals.scm
blob: 45da96292ef9a740c31c42354479a58f6a91212f (plain) (blame)
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
;; Scopes

(document) @scope

(directive) @scope

;; Definitions

(title) @definition

(substitution_definition
  name: (substitution) @definition)

(footnote
  name: (label) @definition)

(citation
  name: (label) @definition)

(target
  name: (name) @definition)

; Inline targets
(inline_target) @definition

; The role directive can define a new role
((directive
  name: (type) @_type
  body: (body) @definition)
 (#match? @_type "role::"))

;; References

[
 (substitution_reference)
 (footnote_reference)
 (citation_reference)
 (reference)
 (role)
] @reference