@oisheek_c/codeforge 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +7 -0
  3. package/apps/cli/bin/codeforge.cmd +2 -0
  4. package/apps/cli/src/bootstrap.js +115 -0
  5. package/apps/cli/src/cli.js +189 -0
  6. package/apps/cli/src/dev/git.js +17 -0
  7. package/apps/cli/src/dev/index.js +68 -0
  8. package/apps/cli/src/dev/provider.js +48 -0
  9. package/apps/cli/src/dev/scanner.js +14 -0
  10. package/apps/cli/src/index.js +31 -0
  11. package/bin/codeforge.js +2 -0
  12. package/package.json +63 -0
  13. package/packages/agent/contextBuilder.js +234 -0
  14. package/packages/agent/executor.js +1729 -0
  15. package/packages/agent/fallback.js +129 -0
  16. package/packages/agent/index.js +26 -0
  17. package/packages/agent/intent.js +73 -0
  18. package/packages/agent/modelSelector.js +469 -0
  19. package/packages/agent/planner.js +379 -0
  20. package/packages/agent/rag.js +412 -0
  21. package/packages/agent/ragSelector.js +570 -0
  22. package/packages/agent/router.js +121 -0
  23. package/packages/agent/thinking.js +54 -0
  24. package/packages/agent/toolCalls.js +258 -0
  25. package/packages/config/config.js +391 -0
  26. package/packages/config/defaults.js +72 -0
  27. package/packages/config/index.js +2 -0
  28. package/packages/core/approvalPolicy.js +140 -0
  29. package/packages/core/context.js +0 -0
  30. package/packages/core/message.js +0 -0
  31. package/packages/core/plan.js +0 -0
  32. package/packages/core/reasoning.js +0 -0
  33. package/packages/core/result.js +0 -0
  34. package/packages/core/retrieval.js +0 -0
  35. package/packages/core/tool.js +536 -0
  36. package/packages/git/branch.js +7 -0
  37. package/packages/git/commit.js +16 -0
  38. package/packages/git/diff.js +15 -0
  39. package/packages/git/git.js +35 -0
  40. package/packages/git/index.js +6 -0
  41. package/packages/git/remote.js +9 -0
  42. package/packages/git/status.js +11 -0
  43. package/packages/memory/index.js +0 -0
  44. package/packages/memory/project.js +0 -0
  45. package/packages/memory/session.js +0 -0
  46. package/packages/prompts/builder.js +43 -0
  47. package/packages/prompts/coder.js +38 -0
  48. package/packages/prompts/index.js +5 -0
  49. package/packages/prompts/planner.js +49 -0
  50. package/packages/prompts/reviewer.js +38 -0
  51. package/packages/prompts/system.js +94 -0
  52. package/packages/providers/index.js +31 -0
  53. package/packages/providers/openrouter.js +380 -0
  54. package/packages/reasoning/budget.js +0 -0
  55. package/packages/reasoning/chain.js +0 -0
  56. package/packages/reasoning/coder.js +0 -0
  57. package/packages/reasoning/evaluator.js +0 -0
  58. package/packages/reasoning/index.js +8 -0
  59. package/packages/reasoning/planner.js +0 -0
  60. package/packages/reasoning/reflector.js +0 -0
  61. package/packages/reasoning/reviewer.js +0 -0
  62. package/packages/reasoning/router.js +0 -0
  63. package/packages/retrieval/budget.js +92 -0
  64. package/packages/retrieval/cache.js +84 -0
  65. package/packages/retrieval/embeddings.js +147 -0
  66. package/packages/retrieval/graph.js +151 -0
  67. package/packages/retrieval/imports.js +74 -0
  68. package/packages/retrieval/index.js +9 -0
  69. package/packages/retrieval/parser/extractors/calls.js +43 -0
  70. package/packages/retrieval/parser/extractors/comments.js +49 -0
  71. package/packages/retrieval/parser/extractors/diagnostics.js +21 -0
  72. package/packages/retrieval/parser/extractors/exports.js +71 -0
  73. package/packages/retrieval/parser/extractors/imports.js +40 -0
  74. package/packages/retrieval/parser/extractors/index.js +12 -0
  75. package/packages/retrieval/parser/extractors/metrics.js +78 -0
  76. package/packages/retrieval/parser/extractors/symbols.js +51 -0
  77. package/packages/retrieval/parser/extractors/todos.js +53 -0
  78. package/packages/retrieval/parser/helpers.js +138 -0
  79. package/packages/retrieval/parser/index.js +10 -0
  80. package/packages/retrieval/parser/languages/c.js +14 -0
  81. package/packages/retrieval/parser/languages/cpp.js +21 -0
  82. package/packages/retrieval/parser/languages/csharp.js +14 -0
  83. package/packages/retrieval/parser/languages/go.js +14 -0
  84. package/packages/retrieval/parser/languages/index.js +12 -0
  85. package/packages/retrieval/parser/languages/java.js +14 -0
  86. package/packages/retrieval/parser/languages/javascript.js +14 -0
  87. package/packages/retrieval/parser/languages/php.js +14 -0
  88. package/packages/retrieval/parser/languages/python.js +14 -0
  89. package/packages/retrieval/parser/languages/ruby.js +14 -0
  90. package/packages/retrieval/parser/languages/rust.js +14 -0
  91. package/packages/retrieval/parser/languages/swift.js +14 -0
  92. package/packages/retrieval/parser/languages/typescript.js +14 -0
  93. package/packages/retrieval/parser/languages.js +218 -0
  94. package/packages/retrieval/parser/parseFile.js +79 -0
  95. package/packages/retrieval/parser/parseRepository.js +78 -0
  96. package/packages/retrieval/parser/queries/c.js +148 -0
  97. package/packages/retrieval/parser/queries/cpp.js +198 -0
  98. package/packages/retrieval/parser/queries/csharp.js +151 -0
  99. package/packages/retrieval/parser/queries/go.js +124 -0
  100. package/packages/retrieval/parser/queries/index.js +35 -0
  101. package/packages/retrieval/parser/queries/java.js +128 -0
  102. package/packages/retrieval/parser/queries/javascript.js +181 -0
  103. package/packages/retrieval/parser/queries/php.js +140 -0
  104. package/packages/retrieval/parser/queries/python.js +110 -0
  105. package/packages/retrieval/parser/queries/ruby.js +105 -0
  106. package/packages/retrieval/parser/queries/rust.js +175 -0
  107. package/packages/retrieval/parser/queries/swift.js +134 -0
  108. package/packages/retrieval/parser/queries/typescript.js +202 -0
  109. package/packages/retrieval/parser/registry.js +107 -0
  110. package/packages/retrieval/parser/traverse.js +82 -0
  111. package/packages/retrieval/parser/types.js +239 -0
  112. package/packages/retrieval/parser.js +78 -0
  113. package/packages/retrieval/ranker.js +73 -0
  114. package/packages/retrieval/retriever.js +910 -0
  115. package/packages/retrieval/symbols.js +145 -0
  116. package/packages/scanner/detect.js +69 -0
  117. package/packages/scanner/ignore.js +12 -0
  118. package/packages/scanner/index.js +2 -0
  119. package/packages/scanner/root.js +21 -0
  120. package/packages/scanner/scanner.js +35 -0
  121. package/packages/scanner/tree.js +45 -0
  122. package/packages/terminal/activity.js +514 -0
  123. package/packages/terminal/banner.js +34 -0
  124. package/packages/terminal/colors.js +16 -0
  125. package/packages/terminal/dashboard.js +94 -0
  126. package/packages/terminal/index.js +19 -0
  127. package/packages/terminal/logger.js +43 -0
  128. package/packages/terminal/prompt.js +11 -0
  129. package/packages/terminal/renderer.js +1209 -0
  130. package/packages/terminal/spinner.js +9 -0
  131. package/packages/tools/editFile.js +261 -0
  132. package/packages/tools/filesystem.js +82 -0
  133. package/packages/tools/index.js +24 -0
  134. package/packages/tools/readFile.js +101 -0
  135. package/packages/tools/registry.js +227 -0
  136. package/packages/tools/searchFiles.js +322 -0
  137. package/packages/tools/shell.js +352 -0
  138. package/packages/tools/writeFile.js +212 -0
  139. package/packages/utils/constants.js +0 -0
  140. package/packages/utils/helpers.js +0 -0
  141. package/packages/utils/logger.js +0 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Tree-sitter queries for PHP.
3
+ *
4
+ * Stable capture namespaces:
5
+ *
6
+ * @symbol.namespace
7
+ * @symbol.class
8
+ * @symbol.interface
9
+ * @symbol.trait
10
+ * @symbol.enum
11
+ * @symbol.function
12
+ * @symbol.method
13
+ * @symbol.property
14
+ * @symbol.constant
15
+ * @symbol.variable
16
+ *
17
+ * @import
18
+ * @export
19
+ * @call
20
+ * @comment
21
+ * @todo
22
+ */
23
+
24
+ export const SYMBOLS = `
25
+ ;; ============================================================
26
+ ;; Namespace
27
+ ;; ============================================================
28
+
29
+ (namespace_definition
30
+ name: (namespace_name) @symbol.namespace)
31
+
32
+ ;; ============================================================
33
+ ;; Classes
34
+ ;; ============================================================
35
+
36
+ (class_declaration
37
+ name: (name) @symbol.class)
38
+
39
+ ;; ============================================================
40
+ ;; Interfaces
41
+ ;; ============================================================
42
+
43
+ (interface_declaration
44
+ name: (name) @symbol.interface)
45
+
46
+ ;; ============================================================
47
+ ;; Traits
48
+ ;; ============================================================
49
+
50
+ (trait_declaration
51
+ name: (name) @symbol.trait)
52
+
53
+ ;; ============================================================
54
+ ;; Enums (PHP 8.1+)
55
+ ;; ============================================================
56
+
57
+ (enum_declaration
58
+ name: (name) @symbol.enum)
59
+
60
+ ;; ============================================================
61
+ ;; Functions
62
+ ;; ============================================================
63
+
64
+ (function_definition
65
+ name: (name) @symbol.function)
66
+
67
+ ;; ============================================================
68
+ ;; Methods
69
+ ;; ============================================================
70
+
71
+ (method_declaration
72
+ name: (name) @symbol.method)
73
+
74
+ ;; ============================================================
75
+ ;; Properties
76
+ ;; ============================================================
77
+
78
+ (property_declaration
79
+ (property_element
80
+ (variable_name) @symbol.property))
81
+
82
+ ;; ============================================================
83
+ ;; Constants
84
+ ;; ============================================================
85
+
86
+ (const_declaration
87
+ (const_element
88
+ (name) @symbol.constant))
89
+
90
+ (class_constant_declaration
91
+ (const_element
92
+ (name) @symbol.constant))
93
+
94
+ ;; ============================================================
95
+ ;; Variables
96
+ ;; ============================================================
97
+
98
+ (simple_parameter
99
+ name: (variable_name) @symbol.variable)
100
+
101
+ (assignment_expression
102
+ left: (variable_name) @symbol.variable)
103
+ `;
104
+
105
+ export const IMPORTS = `
106
+ ;; ============================================================
107
+ ;; use statements
108
+ ;; ============================================================
109
+
110
+ (namespace_use_declaration) @import
111
+ `;
112
+
113
+ export const EXPORTS = `
114
+ `;
115
+
116
+ export const CALLS = `
117
+ ;; foo()
118
+
119
+ (function_call_expression
120
+ function: (name) @call)
121
+
122
+ ;; $obj->foo()
123
+
124
+ (member_call_expression
125
+ name: (name) @call)
126
+
127
+ ;; Foo::bar()
128
+
129
+ (scoped_call_expression
130
+ name: (name) @call)
131
+ `;
132
+
133
+ export const COMMENTS = `
134
+ (comment) @comment
135
+ `;
136
+
137
+ export const TODOS = `
138
+ (comment) @todo
139
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
140
+ `;
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Tree-sitter queries for Python.
3
+ *
4
+ * Stable capture namespaces:
5
+ *
6
+ * @symbol.class
7
+ * @symbol.function
8
+ * @symbol.method
9
+ * @symbol.variable
10
+ *
11
+ * @import
12
+ * @export
13
+ * @call
14
+ * @comment
15
+ * @todo
16
+ */
17
+
18
+ export const SYMBOLS = `
19
+ ;; ============================================================
20
+ ;; Classes
21
+ ;; ============================================================
22
+
23
+ (class_definition
24
+ name: (identifier) @symbol.class)
25
+
26
+ ;; ============================================================
27
+ ;; Functions
28
+ ;; ============================================================
29
+
30
+ (function_definition
31
+ name: (identifier) @symbol.function)
32
+
33
+ ;; Async functions
34
+
35
+ (function_definition
36
+ "async"
37
+ name: (identifier) @symbol.function)
38
+
39
+ ;; ============================================================
40
+ ;; Variables
41
+ ;; ============================================================
42
+
43
+ (assignment
44
+ left: (identifier) @symbol.variable)
45
+
46
+ (assignment
47
+ left: (tuple
48
+ (identifier) @symbol.variable))
49
+
50
+ (assignment
51
+ left: (list
52
+ (identifier) @symbol.variable))
53
+ `;
54
+
55
+ export const IMPORTS = `
56
+ ;; ============================================================
57
+ ;; import os
58
+ ;; import os.path
59
+ ;; import numpy as np
60
+ ;; ============================================================
61
+
62
+ (import_statement) @import
63
+
64
+ ;; ============================================================
65
+ ;; from pathlib import Path
66
+ ;; from .foo import bar
67
+ ;; from . import utils
68
+ ;; ============================================================
69
+
70
+ (import_from_statement) @import
71
+ `;
72
+
73
+ export const EXPORTS = `
74
+ `;
75
+
76
+ export const CALLS = `
77
+ ;; ============================================================
78
+ ;; foo()
79
+ ;; ============================================================
80
+
81
+ (call
82
+ function: (identifier) @call)
83
+
84
+ ;; ============================================================
85
+ ;; obj.foo()
86
+ ;; module.func()
87
+ ;; super().foo()
88
+ ;; ============================================================
89
+
90
+ (call
91
+ function:
92
+ (attribute
93
+ attribute: (identifier) @call))
94
+
95
+ ;; ============================================================
96
+ ;; callable(...)
97
+ ;; ============================================================
98
+
99
+ (call
100
+ function: (_) @call)
101
+ `;
102
+
103
+ export const COMMENTS = `
104
+ (comment) @comment
105
+ `;
106
+
107
+ export const TODOS = `
108
+ (comment) @todo
109
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
110
+ `;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Tree-sitter queries for Ruby.
3
+ *
4
+ * Stable capture namespaces:
5
+ *
6
+ * @symbol.module
7
+ * @symbol.class
8
+ * @symbol.method
9
+ * @symbol.singleton_method
10
+ * @symbol.constant
11
+ * @symbol.variable
12
+ *
13
+ * @import
14
+ * @export
15
+ * @call
16
+ * @comment
17
+ * @todo
18
+ */
19
+
20
+ export const SYMBOLS = `
21
+ ;; ============================================================
22
+ ;; Modules
23
+ ;; ============================================================
24
+
25
+ (module
26
+ name: (constant) @symbol.module)
27
+
28
+ ;; ============================================================
29
+ ;; Classes
30
+ ;; ============================================================
31
+
32
+ (class
33
+ name: (constant) @symbol.class)
34
+
35
+ ;; ============================================================
36
+ ;; Instance methods
37
+ ;; ============================================================
38
+
39
+ (method
40
+ name: (identifier) @symbol.method)
41
+
42
+ ;; ============================================================
43
+ ;; Singleton methods
44
+ ;; def self.foo
45
+ ;; ============================================================
46
+
47
+ (singleton_method
48
+ name: (identifier) @symbol.singleton_method)
49
+
50
+ ;; ============================================================
51
+ ;; Constants
52
+ ;; ============================================================
53
+
54
+ (constant
55
+ name: (constant) @symbol.constant)
56
+
57
+ ;; ============================================================
58
+ ;; Variables
59
+ ;; ============================================================
60
+
61
+ (assignment
62
+ left: (identifier) @symbol.variable)
63
+ `;
64
+
65
+ export const IMPORTS = `
66
+ ;; ============================================================
67
+ ;; require
68
+ ;; require_relative
69
+ ;; ============================================================
70
+
71
+ (call
72
+ method: (identifier) @_require
73
+ (#match? @_require "^(require|require_relative)$"))
74
+ @import
75
+ `;
76
+
77
+ export const EXPORTS = `
78
+ `;
79
+
80
+ export const CALLS = `
81
+ ;; foo()
82
+
83
+ (call
84
+ method: (identifier) @call)
85
+
86
+ ;; obj.foo()
87
+
88
+ (call
89
+ method: (identifier) @call)
90
+
91
+ ;; Foo.bar()
92
+
93
+ (call
94
+ receiver: (_)
95
+ method: (identifier) @call)
96
+ `;
97
+
98
+ export const COMMENTS = `
99
+ (comment) @comment
100
+ `;
101
+
102
+ export const TODOS = `
103
+ (comment) @todo
104
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
105
+ `;
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Tree-sitter queries for Rust.
3
+ *
4
+ * Stable capture namespaces:
5
+ *
6
+ * @symbol.module
7
+ * @symbol.struct
8
+ * @symbol.enum
9
+ * @symbol.union
10
+ * @symbol.trait
11
+ * @symbol.impl
12
+ * @symbol.function
13
+ * @symbol.method
14
+ * @symbol.constant
15
+ * @symbol.static
16
+ * @symbol.type
17
+ * @symbol.variable
18
+ * @symbol.macro
19
+ *
20
+ * @import
21
+ * @export
22
+ * @call
23
+ * @comment
24
+ * @todo
25
+ */
26
+
27
+ export const SYMBOLS = `
28
+ ;; ============================================================
29
+ ;; Modules
30
+ ;; ============================================================
31
+
32
+ (mod_item
33
+ name: (identifier) @symbol.module)
34
+
35
+ ;; ============================================================
36
+ ;; Structs
37
+ ;; ============================================================
38
+
39
+ (struct_item
40
+ name: (type_identifier) @symbol.struct)
41
+
42
+ ;; ============================================================
43
+ ;; Enums
44
+ ;; ============================================================
45
+
46
+ (enum_item
47
+ name: (type_identifier) @symbol.enum)
48
+
49
+ ;; ============================================================
50
+ ;; Unions
51
+ ;; ============================================================
52
+
53
+ (union_item
54
+ name: (type_identifier) @symbol.union)
55
+
56
+ ;; ============================================================
57
+ ;; Traits
58
+ ;; ============================================================
59
+
60
+ (trait_item
61
+ name: (type_identifier) @symbol.trait)
62
+
63
+ ;; ============================================================
64
+ ;; Impl blocks
65
+ ;; ============================================================
66
+
67
+ (impl_item
68
+ type: (type_identifier) @symbol.impl)
69
+
70
+ ;; ============================================================
71
+ ;; Functions
72
+ ;; ============================================================
73
+
74
+ (function_item
75
+ name: (identifier) @symbol.function)
76
+
77
+ ;; ============================================================
78
+ ;; Methods
79
+ ;; ============================================================
80
+
81
+ (function_item
82
+ name: (identifier) @symbol.method
83
+ (#has-ancestor? impl_item))
84
+
85
+ ;; ============================================================
86
+ ;; Type aliases
87
+ ;; ============================================================
88
+
89
+ (type_item
90
+ name: (type_identifier) @symbol.type)
91
+
92
+ ;; ============================================================
93
+ ;; Constants
94
+ ;; ============================================================
95
+
96
+ (const_item
97
+ name: (identifier) @symbol.constant)
98
+
99
+ ;; ============================================================
100
+ ;; Static variables
101
+ ;; ============================================================
102
+
103
+ (static_item
104
+ name: (identifier) @symbol.static)
105
+
106
+ ;; ============================================================
107
+ ;; Macros
108
+ ;; ============================================================
109
+
110
+ (macro_definition
111
+ name: (identifier) @symbol.macro)
112
+
113
+ (let_declaration
114
+ pattern: (identifier) @symbol.variable)
115
+ `;
116
+
117
+ export const IMPORTS = `
118
+ (use_declaration) @import
119
+ `;
120
+
121
+ export const EXPORTS = `
122
+ `;
123
+
124
+ export const CALLS = `
125
+ ;; ============================================================
126
+ ;; foo()
127
+ ;; ============================================================
128
+
129
+ (call_expression
130
+ function: (identifier) @call)
131
+
132
+ ;; ============================================================
133
+ ;; module::foo()
134
+ ;; Type::new()
135
+ ;; ============================================================
136
+
137
+ (call_expression
138
+ function:
139
+ (scoped_identifier
140
+ name: (identifier) @call))
141
+
142
+ ;; ============================================================
143
+ ;; obj.foo()
144
+ ;; ============================================================
145
+
146
+ (call_expression
147
+ function:
148
+ (field_expression
149
+ field: (field_identifier) @call))
150
+
151
+ ;; ============================================================
152
+ ;; Macros
153
+ ;; println!()
154
+ ;; vec!()
155
+ ;; serde_json!()
156
+ ;; ============================================================
157
+
158
+ (macro_invocation
159
+ macro:
160
+ (identifier) @call)
161
+ `;
162
+
163
+ export const COMMENTS = `
164
+ (line_comment) @comment
165
+
166
+ (block_comment) @comment
167
+ `;
168
+
169
+ export const TODOS = `
170
+ (line_comment) @todo
171
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
172
+
173
+ (block_comment) @todo
174
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
175
+ `;
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Tree-sitter queries for Swift.
3
+ *
4
+ * Stable capture namespaces:
5
+ *
6
+ * @symbol.import
7
+ * @symbol.class
8
+ * @symbol.struct
9
+ * @symbol.enum
10
+ * @symbol.protocol
11
+ * @symbol.extension
12
+ * @symbol.actor
13
+ * @symbol.function
14
+ * @symbol.initializer
15
+ * @symbol.deinitializer
16
+ * @symbol.subscript
17
+ * @symbol.property
18
+ * @symbol.variable
19
+ * @symbol.typealias
20
+ *
21
+ * @import
22
+ * @export
23
+ * @call
24
+ * @comment
25
+ * @todo
26
+ */
27
+
28
+ export const SYMBOLS = `
29
+ ;; ============================================================
30
+ ;; Classes
31
+ ;; ============================================================
32
+
33
+ (class_declaration
34
+ name: (type_identifier) @symbol.class)
35
+
36
+ ;; ============================================================
37
+ ;; Structs
38
+ ;; ============================================================
39
+
40
+ (struct_declaration
41
+ name: (type_identifier) @symbol.struct)
42
+
43
+ ;; ============================================================
44
+ ;; Enums
45
+ ;; ============================================================
46
+
47
+ (enum_declaration
48
+ name: (type_identifier) @symbol.enum)
49
+
50
+ ;; ============================================================
51
+ ;; Protocols
52
+ ;; ============================================================
53
+
54
+ (protocol_declaration
55
+ name: (type_identifier) @symbol.protocol)
56
+
57
+ ;; ============================================================
58
+ ;; Extensions
59
+ ;; ============================================================
60
+
61
+ (extension_declaration
62
+ type: (type_identifier) @symbol.extension)
63
+
64
+ ;; ============================================================
65
+ ;; Actors
66
+ ;; ============================================================
67
+
68
+ (actor_declaration
69
+ name: (type_identifier) @symbol.actor)
70
+
71
+ ;; ============================================================
72
+ ;; Typealiases
73
+ ;; ============================================================
74
+
75
+ (typealias_declaration
76
+ name: (type_identifier) @symbol.typealias)
77
+
78
+ ;; ============================================================
79
+ ;; Functions
80
+ ;; ============================================================
81
+
82
+ (function_declaration
83
+ name: (simple_identifier) @symbol.function)
84
+
85
+ ;; ============================================================
86
+ ;; Initializers
87
+ ;; ============================================================
88
+
89
+ (initializer_declaration) @symbol.initializer
90
+
91
+ ;; ============================================================
92
+ ;; Deinitializers
93
+ ;; ============================================================
94
+
95
+ (deinitializer_declaration) @symbol.deinitializer
96
+
97
+ ;; ============================================================
98
+ ;; Subscripts
99
+ ;; ============================================================
100
+
101
+ (subscript_declaration) @symbol.subscript
102
+
103
+ ;; ============================================================
104
+ ;; Properties
105
+ ;; ============================================================
106
+
107
+ (property_declaration
108
+ (pattern
109
+ (identifier) @symbol.property))
110
+
111
+ ;; ============================================================
112
+ ;; Variables
113
+ ;; ============================================================
114
+
115
+ (variable_declaration
116
+ (pattern
117
+ (identifier) @symbol.variable))
118
+ `;
119
+
120
+ export const IMPORTS = `
121
+ (import_declaration) @import
122
+ `;
123
+
124
+ export const EXPORTS = `
125
+ `;
126
+
127
+ export const COMMENTS = `
128
+ (comment) @comment
129
+ `;
130
+
131
+ export const TODOS = `
132
+ (comment) @todo
133
+ (#match? @todo "(?i)(TODO|FIXME|BUG|HACK|XXX|NOTE)")
134
+ `;