Unnamed repository; edit this file 'description' to name the repository.
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
; Concerto Language - Locals Queries (Helix)
; ============================================
; Helix-specific local scope/definition/reference tracking. For use in
; helix-editor/helix at runtime/queries/concerto/locals.scm
;
; Helix uses the same @local.scope, @local.definition, and @local.reference
; capture names as tree-sitter convention.

; Scopes
; ------

; Each declaration body creates a new scope
(concept_declaration) @local.scope
(asset_declaration) @local.scope
(participant_declaration) @local.scope
(transaction_declaration) @local.scope
(event_declaration) @local.scope
(enum_declaration) @local.scope
(map_declaration) @local.scope

; Definitions
; -----------

; Type declarations define types
(concept_declaration
  name: (type_identifier) @local.definition.type)

(asset_declaration
  name: (type_identifier) @local.definition.type)

(participant_declaration
  name: (type_identifier) @local.definition.type)

(transaction_declaration
  name: (type_identifier) @local.definition.type)

(event_declaration
  name: (type_identifier) @local.definition.type)

(enum_declaration
  name: (type_identifier) @local.definition.type)

(scalar_declaration
  name: (type_identifier) @local.definition.type)

(map_declaration
  name: (type_identifier) @local.definition.type)

; Property declarations define properties
(string_field
  name: (identifier) @local.definition.variable.other.member)

(boolean_field
  name: (identifier) @local.definition.variable.other.member)

(datetime_field
  name: (identifier) @local.definition.variable.other.member)

(integer_field
  name: (identifier) @local.definition.variable.other.member)

(long_field
  name: (identifier) @local.definition.variable.other.member)

(double_field
  name: (identifier) @local.definition.variable.other.member)

(object_field
  name: (identifier) @local.definition.variable.other.member)

(relationship_field
  name: (identifier) @local.definition.variable.other.member)

(enum_property
  name: (identifier) @local.definition.variable.other.member)

; References
; ----------

; Type references
(extends_clause
  (type_identifier) @local.reference)

(object_field
  type: (type_identifier) @local.reference)

(relationship_field
  type: (type_identifier) @local.reference)