@mgamil/mapx 0.2.4

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 (203) hide show
  1. package/LICENSE +194 -0
  2. package/README.md +488 -0
  3. package/VERSION +1 -0
  4. package/dist/agents/generator.d.ts +74 -0
  5. package/dist/agents/generator.js +375 -0
  6. package/dist/agents/templates.d.ts +29 -0
  7. package/dist/agents/templates.js +459 -0
  8. package/dist/cli.d.ts +16 -0
  9. package/dist/cli.js +1835 -0
  10. package/dist/core/cluster-engine.d.ts +32 -0
  11. package/dist/core/cluster-engine.js +314 -0
  12. package/dist/core/config.d.ts +29 -0
  13. package/dist/core/config.js +178 -0
  14. package/dist/core/context-builder.d.ts +61 -0
  15. package/dist/core/context-builder.js +252 -0
  16. package/dist/core/flow-tracer.d.ts +63 -0
  17. package/dist/core/flow-tracer.js +366 -0
  18. package/dist/core/git-tracker.d.ts +20 -0
  19. package/dist/core/git-tracker.js +159 -0
  20. package/dist/core/graph.d.ts +42 -0
  21. package/dist/core/graph.js +186 -0
  22. package/dist/core/metrics.d.ts +24 -0
  23. package/dist/core/metrics.js +87 -0
  24. package/dist/core/scanner.d.ts +53 -0
  25. package/dist/core/scanner.js +949 -0
  26. package/dist/core/store-bun.d.ts +13 -0
  27. package/dist/core/store-bun.js +34 -0
  28. package/dist/core/store-interface.d.ts +15 -0
  29. package/dist/core/store-interface.js +7 -0
  30. package/dist/core/store-node.d.ts +13 -0
  31. package/dist/core/store-node.js +35 -0
  32. package/dist/core/store.d.ts +132 -0
  33. package/dist/core/store.js +614 -0
  34. package/dist/core/workspace-manager.d.ts +9 -0
  35. package/dist/core/workspace-manager.js +64 -0
  36. package/dist/exporters/dot-exporter.d.ts +16 -0
  37. package/dist/exporters/dot-exporter.js +179 -0
  38. package/dist/exporters/graph-exporter.d.ts +14 -0
  39. package/dist/exporters/graph-exporter.js +85 -0
  40. package/dist/exporters/index.d.ts +9 -0
  41. package/dist/exporters/index.js +12 -0
  42. package/dist/exporters/llm-exporter.d.ts +18 -0
  43. package/dist/exporters/llm-exporter.js +224 -0
  44. package/dist/exporters/svg-exporter.d.ts +19 -0
  45. package/dist/exporters/svg-exporter.js +319 -0
  46. package/dist/exporters/toon-exporter.d.ts +16 -0
  47. package/dist/exporters/toon-exporter.js +246 -0
  48. package/dist/frameworks/detectors/aspnet.d.ts +11 -0
  49. package/dist/frameworks/detectors/aspnet.js +52 -0
  50. package/dist/frameworks/detectors/django.d.ts +14 -0
  51. package/dist/frameworks/detectors/django.js +135 -0
  52. package/dist/frameworks/detectors/drupal.d.ts +13 -0
  53. package/dist/frameworks/detectors/drupal.js +94 -0
  54. package/dist/frameworks/detectors/express.d.ts +12 -0
  55. package/dist/frameworks/detectors/express.js +234 -0
  56. package/dist/frameworks/detectors/fastapi.d.ts +12 -0
  57. package/dist/frameworks/detectors/fastapi.js +203 -0
  58. package/dist/frameworks/detectors/flask.d.ts +12 -0
  59. package/dist/frameworks/detectors/flask.js +244 -0
  60. package/dist/frameworks/detectors/go.d.ts +11 -0
  61. package/dist/frameworks/detectors/go.js +75 -0
  62. package/dist/frameworks/detectors/laravel.d.ts +11 -0
  63. package/dist/frameworks/detectors/laravel.js +462 -0
  64. package/dist/frameworks/detectors/nestjs.d.ts +12 -0
  65. package/dist/frameworks/detectors/nestjs.js +155 -0
  66. package/dist/frameworks/detectors/nextjs.d.ts +11 -0
  67. package/dist/frameworks/detectors/nextjs.js +118 -0
  68. package/dist/frameworks/detectors/rails.d.ts +12 -0
  69. package/dist/frameworks/detectors/rails.js +76 -0
  70. package/dist/frameworks/detectors/react-router.d.ts +11 -0
  71. package/dist/frameworks/detectors/react-router.js +115 -0
  72. package/dist/frameworks/detectors/rust.d.ts +11 -0
  73. package/dist/frameworks/detectors/rust.js +59 -0
  74. package/dist/frameworks/detectors/spring.d.ts +11 -0
  75. package/dist/frameworks/detectors/spring.js +56 -0
  76. package/dist/frameworks/detectors/sveltekit.d.ts +11 -0
  77. package/dist/frameworks/detectors/sveltekit.js +154 -0
  78. package/dist/frameworks/detectors/symfony.d.ts +13 -0
  79. package/dist/frameworks/detectors/symfony.js +175 -0
  80. package/dist/frameworks/detectors/tanstack-router.d.ts +12 -0
  81. package/dist/frameworks/detectors/tanstack-router.js +80 -0
  82. package/dist/frameworks/detectors/vapor.d.ts +11 -0
  83. package/dist/frameworks/detectors/vapor.js +52 -0
  84. package/dist/frameworks/detectors/vue-router.d.ts +12 -0
  85. package/dist/frameworks/detectors/vue-router.js +237 -0
  86. package/dist/frameworks/detectors/wordpress.d.ts +13 -0
  87. package/dist/frameworks/detectors/wordpress.js +141 -0
  88. package/dist/frameworks/detectors/yii.d.ts +11 -0
  89. package/dist/frameworks/detectors/yii.js +131 -0
  90. package/dist/frameworks/framework-registry.d.ts +13 -0
  91. package/dist/frameworks/framework-registry.js +77 -0
  92. package/dist/frameworks/route-registry.d.ts +26 -0
  93. package/dist/frameworks/route-registry.js +102 -0
  94. package/dist/index.d.ts +19 -0
  95. package/dist/index.js +30 -0
  96. package/dist/languages/index.d.ts +2 -0
  97. package/dist/languages/index.js +7 -0
  98. package/dist/languages/installer.d.ts +13 -0
  99. package/dist/languages/installer.js +103 -0
  100. package/dist/languages/registry.d.ts +19 -0
  101. package/dist/languages/registry.js +427 -0
  102. package/dist/main.d.ts +2 -0
  103. package/dist/main.js +20 -0
  104. package/dist/mcp.d.ts +11 -0
  105. package/dist/mcp.js +1699 -0
  106. package/dist/parsers/common-methods.d.ts +3 -0
  107. package/dist/parsers/common-methods.js +33 -0
  108. package/dist/parsers/fallback-parser.d.ts +10 -0
  109. package/dist/parsers/fallback-parser.js +18 -0
  110. package/dist/parsers/generic-wasm-parser.d.ts +23 -0
  111. package/dist/parsers/generic-wasm-parser.js +168 -0
  112. package/dist/parsers/ignored-symbols.d.ts +26 -0
  113. package/dist/parsers/ignored-symbols.js +77 -0
  114. package/dist/parsers/index.d.ts +9 -0
  115. package/dist/parsers/index.js +13 -0
  116. package/dist/parsers/languages/javascript.d.ts +11 -0
  117. package/dist/parsers/languages/javascript.js +28 -0
  118. package/dist/parsers/languages/php.d.ts +15 -0
  119. package/dist/parsers/languages/php.js +648 -0
  120. package/dist/parsers/languages/typescript.d.ts +10 -0
  121. package/dist/parsers/languages/typescript.js +9 -0
  122. package/dist/parsers/languages/vue.d.ts +13 -0
  123. package/dist/parsers/languages/vue.js +63 -0
  124. package/dist/parsers/parse-worker.d.ts +2 -0
  125. package/dist/parsers/parse-worker.js +185 -0
  126. package/dist/parsers/parser-interface.d.ts +9 -0
  127. package/dist/parsers/parser-interface.js +0 -0
  128. package/dist/parsers/parser-registry.d.ts +8 -0
  129. package/dist/parsers/parser-registry.js +52 -0
  130. package/dist/parsers/wasm-parser.d.ts +16 -0
  131. package/dist/parsers/wasm-parser.js +110 -0
  132. package/dist/types.d.ts +172 -0
  133. package/dist/types.js +0 -0
  134. package/dist/ui/index.html +270 -0
  135. package/dist/ui/main.js +581 -0
  136. package/dist/ui/main.js.map +7 -0
  137. package/dist/ui/styles.css +573 -0
  138. package/dist/ui-events.d.ts +36 -0
  139. package/dist/ui-events.js +61 -0
  140. package/dist/ui-server.d.ts +12 -0
  141. package/dist/ui-server.js +504 -0
  142. package/package.json +179 -0
  143. package/queries/bash/references.scm +22 -0
  144. package/queries/bash/symbols.scm +15 -0
  145. package/queries/c/references.scm +14 -0
  146. package/queries/c/symbols.scm +30 -0
  147. package/queries/c-sharp/references.scm +26 -0
  148. package/queries/c-sharp/symbols.scm +57 -0
  149. package/queries/cpp/references.scm +21 -0
  150. package/queries/cpp/symbols.scm +44 -0
  151. package/queries/dart/references.scm +33 -0
  152. package/queries/dart/symbols.scm +38 -0
  153. package/queries/elixir/references.scm +45 -0
  154. package/queries/elixir/symbols.scm +41 -0
  155. package/queries/go/references.scm +22 -0
  156. package/queries/go/symbols.scm +53 -0
  157. package/queries/java/references.scm +32 -0
  158. package/queries/java/symbols.scm +41 -0
  159. package/queries/javascript/references.scm +14 -0
  160. package/queries/javascript/symbols.scm +23 -0
  161. package/queries/kotlin/references.scm +31 -0
  162. package/queries/kotlin/symbols.scm +24 -0
  163. package/queries/lua/references.scm +19 -0
  164. package/queries/lua/symbols.scm +29 -0
  165. package/queries/pascal/references.scm +29 -0
  166. package/queries/pascal/symbols.scm +45 -0
  167. package/queries/php/references.scm +109 -0
  168. package/queries/php/symbols.scm +33 -0
  169. package/queries/python/references.scm +50 -0
  170. package/queries/python/symbols.scm +21 -0
  171. package/queries/ruby/references.scm +48 -0
  172. package/queries/ruby/symbols.scm +24 -0
  173. package/queries/rust/references.scm +31 -0
  174. package/queries/rust/symbols.scm +35 -0
  175. package/queries/scala/references.scm +30 -0
  176. package/queries/scala/symbols.scm +35 -0
  177. package/queries/svelte/references.scm +20 -0
  178. package/queries/svelte/symbols.scm +30 -0
  179. package/queries/swift/references.scm +22 -0
  180. package/queries/swift/symbols.scm +37 -0
  181. package/queries/typescript/references.scm +25 -0
  182. package/queries/typescript/symbols.scm +35 -0
  183. package/queries/vue/references.scm +20 -0
  184. package/queries/vue/symbols.scm +28 -0
  185. package/queries/zig/references.scm +20 -0
  186. package/queries/zig/symbols.scm +22 -0
  187. package/wasm/tree-sitter-c.wasm +0 -0
  188. package/wasm/tree-sitter-c_sharp.wasm +0 -0
  189. package/wasm/tree-sitter-cpp.wasm +0 -0
  190. package/wasm/tree-sitter-dart.wasm +0 -0
  191. package/wasm/tree-sitter-go.wasm +0 -0
  192. package/wasm/tree-sitter-java.wasm +0 -0
  193. package/wasm/tree-sitter-javascript.wasm +0 -0
  194. package/wasm/tree-sitter-kotlin.wasm +0 -0
  195. package/wasm/tree-sitter-php.wasm +0 -0
  196. package/wasm/tree-sitter-python.wasm +0 -0
  197. package/wasm/tree-sitter-ruby.wasm +0 -0
  198. package/wasm/tree-sitter-rust.wasm +0 -0
  199. package/wasm/tree-sitter-scala.wasm +0 -0
  200. package/wasm/tree-sitter-swift.wasm +0 -0
  201. package/wasm/tree-sitter-tsx.wasm +0 -0
  202. package/wasm/tree-sitter-typescript.wasm +0 -0
  203. package/wasm/tree-sitter-vue.wasm +0 -0
@@ -0,0 +1,22 @@
1
+ ; Bash Reference Extraction Queries
2
+
3
+ ; source / . includes
4
+ (command
5
+ name: (word) @_source
6
+ argument: (word) @ref.target_import
7
+ (#match? @_source "^(source|\\.)$")) @ref.type_import
8
+
9
+ ; Command invocations
10
+ (command
11
+ name: (word) @ref.target_call) @ref.type_call
12
+
13
+ ; Command substitution calls
14
+ (command_substitution
15
+ (command
16
+ name: (word) @ref.target_call)) @ref.type_call
17
+
18
+ ; Function calls (same as commands in bash)
19
+ (function_definition
20
+ body: (compound_statement
21
+ (command
22
+ name: (word) @ref.target_call))) @ref.type_call
@@ -0,0 +1,15 @@
1
+ ; Bash Symbol Extraction Queries
2
+
3
+ ; Function definitions: function foo() { } or foo() { }
4
+ (function_definition
5
+ name: (word) @symbol.name) @symbol.kind_function
6
+
7
+ ; Variable assignments (exported or not): FOO=bar, export FOO=bar
8
+ (variable_assignment
9
+ name: (variable_name) @symbol.name) @symbol.kind_constant
10
+
11
+ ; Alias definitions: alias foo='bar'
12
+ (command
13
+ name: (word) @_alias
14
+ argument: (word) @symbol.name
15
+ (#eq? @_alias "alias")) @symbol.kind_constant
@@ -0,0 +1,14 @@
1
+ ; C Reference Extraction Queries
2
+
3
+ ; #include "file.h" or #include <file.h>
4
+ (preproc_include
5
+ path: [(string_literal) (system_lib_string)] @ref.target_import) @ref.type_import
6
+
7
+ ; Function calls
8
+ (call_expression
9
+ function: (identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Function pointer calls
12
+ (call_expression
13
+ function: (field_expression
14
+ field: (field_identifier) @ref.target_call)) @ref.type_call
@@ -0,0 +1,30 @@
1
+ ; C Symbol Extraction Queries
2
+
3
+ ; Struct definitions
4
+ (struct_specifier
5
+ name: (type_identifier) @symbol.name) @symbol.kind_struct
6
+
7
+ ; Enum definitions
8
+ (enum_specifier
9
+ name: (type_identifier) @symbol.name) @symbol.kind_enum
10
+
11
+ ; Function definitions
12
+ (function_definition
13
+ declarator: (function_declarator
14
+ declarator: (identifier) @symbol.name)) @symbol.kind_function
15
+
16
+ ; Typedef declarations
17
+ (type_definition
18
+ declarator: (type_identifier) @symbol.name) @symbol.kind_constant
19
+
20
+ ; Macro definitions (#define FOO)
21
+ (preproc_def
22
+ name: (identifier) @symbol.name) @symbol.kind_constant
23
+
24
+ ; Function-like macro definitions (#define FOO(x))
25
+ (preproc_function_def
26
+ name: (identifier) @symbol.name) @symbol.kind_constant
27
+
28
+ ; Union definitions
29
+ (union_specifier
30
+ name: (type_identifier) @symbol.name) @symbol.kind_struct
@@ -0,0 +1,26 @@
1
+ ; C# Reference Extraction Queries
2
+
3
+ ; Using directives
4
+ (using_directive name: [(identifier) (qualified_name)] @ref.target_import) @ref.type_import
5
+
6
+ ; Class/struct inheritance: class Foo : Bar
7
+ (base_list
8
+ (simple_base_type (identifier) @ref.target_extends)) @ref.type_extends
9
+
10
+ (base_list
11
+ (simple_base_type (generic_name (identifier) @ref.target_extends))) @ref.type_extends
12
+
13
+ ; Method calls
14
+ (invocation_expression
15
+ function: [
16
+ (identifier) @ref.target_call
17
+ (member_access_expression name: (identifier) @ref.target_call)
18
+ ]) @ref.type_call
19
+
20
+ ; Object instantiation: new ClassName()
21
+ (object_creation_expression
22
+ type: (_) @ref.target_instantiation) @ref.type_instantiation
23
+
24
+ ; Attribute references: [Attribute]
25
+ (attribute
26
+ name: (identifier) @ref.target_call) @ref.type_call
@@ -0,0 +1,57 @@
1
+ ; C# Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_declaration name: (identifier) @symbol.name) @symbol.kind_class
5
+
6
+ ; Interfaces
7
+ (interface_declaration name: (identifier) @symbol.name) @symbol.kind_interface
8
+
9
+ ; Enums
10
+ (enum_declaration name: (identifier) @symbol.name) @symbol.kind_enum
11
+
12
+ ; Structs
13
+ (struct_declaration name: (identifier) @symbol.name) @symbol.kind_struct
14
+
15
+ ; Methods
16
+ (method_declaration name: (identifier) @symbol.name) @symbol.kind_method
17
+
18
+ ; Constructors
19
+ (constructor_declaration name: (identifier) @symbol.name) @symbol.kind_method
20
+
21
+ ; Property declarations
22
+ (property_declaration
23
+ name: (identifier) @symbol.name) @symbol.kind_property
24
+
25
+ ; Field declarations
26
+ (field_declaration
27
+ (variable_declaration
28
+ (variable_declarator
29
+ (identifier) @symbol.name))) @symbol.kind_property
30
+
31
+ ; Constant declarations (const fields)
32
+ (field_declaration
33
+ (modifier) @_const
34
+ (variable_declaration
35
+ (variable_declarator
36
+ (identifier) @symbol.name))
37
+ (#eq? @_const "const")) @symbol.kind_constant
38
+
39
+ ; Namespace declarations
40
+ (namespace_declaration
41
+ name: [(identifier) (qualified_name)] @symbol.name) @symbol.kind_namespace
42
+
43
+ ; Record declarations
44
+ (record_declaration
45
+ name: (identifier) @symbol.name) @symbol.kind_class
46
+
47
+ ; Delegate declarations
48
+ (delegate_declaration
49
+ name: (identifier) @symbol.name) @symbol.kind_interface
50
+
51
+ ; Event declarations
52
+ (event_declaration
53
+ name: (identifier) @symbol.name) @symbol.kind_property
54
+
55
+ ; Enum member declarations
56
+ (enum_member_declaration
57
+ name: (identifier) @symbol.name) @symbol.kind_constant
@@ -0,0 +1,21 @@
1
+ ; C++ Reference Extraction Queries
2
+
3
+ ; #include "file.h" or #include <file.h>
4
+ (preproc_include
5
+ path: [(string_literal) (system_lib_string)] @ref.target_import) @ref.type_import
6
+
7
+ ; Function/method calls
8
+ (call_expression
9
+ function: [
10
+ (identifier) @ref.target_call
11
+ (field_expression field: (field_identifier) @ref.target_call)
12
+ (qualified_identifier name: (identifier) @ref.target_call)
13
+ ]) @ref.type_call
14
+
15
+ ; Class inheritance: class Foo : public Bar
16
+ (base_class_clause
17
+ (type_identifier) @ref.target_extends) @ref.type_extends
18
+
19
+ ; new ClassName()
20
+ (new_expression
21
+ type: (type_identifier) @ref.target_instantiation) @ref.type_instantiation
@@ -0,0 +1,44 @@
1
+ ; C++ Symbol Extraction Queries
2
+
3
+ ; Class definitions
4
+ (class_specifier
5
+ name: (type_identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Struct definitions
8
+ (struct_specifier
9
+ name: (type_identifier) @symbol.name) @symbol.kind_struct
10
+
11
+ ; Namespace definitions
12
+ (namespace_definition
13
+ name: (namespace_identifier) @symbol.name) @symbol.kind_namespace
14
+
15
+ ; Enum definitions
16
+ (enum_specifier
17
+ name: (type_identifier) @symbol.name) @symbol.kind_enum
18
+
19
+ ; Function definitions (free functions and method definitions)
20
+ (function_definition
21
+ declarator: (function_declarator
22
+ declarator: [
23
+ (identifier) @symbol.name
24
+ (field_identifier) @symbol.name
25
+ (qualified_identifier
26
+ name: (identifier) @symbol.name)
27
+ (qualified_identifier
28
+ name: (destructor_name (identifier) @symbol.name))
29
+ ])) @symbol.kind_function
30
+
31
+ ; Template class declarations
32
+ (template_declaration
33
+ (class_specifier
34
+ name: (type_identifier) @symbol.name)) @symbol.kind_class
35
+
36
+ ; Template function declarations
37
+ (template_declaration
38
+ (function_definition
39
+ declarator: (function_declarator
40
+ declarator: [(identifier) (field_identifier)] @symbol.name))) @symbol.kind_function
41
+
42
+ ; Type alias using declarations
43
+ (alias_declaration
44
+ name: (type_identifier) @symbol.name) @symbol.kind_constant
@@ -0,0 +1,33 @@
1
+ ; Dart Reference Extraction Queries
2
+
3
+ ; Import statements
4
+ (import_specification
5
+ (string_literal) @ref.target_import) @ref.type_import
6
+
7
+ ; Export statements
8
+ (export_specification
9
+ (string_literal) @ref.target_import) @ref.type_import
10
+
11
+ ; Class extends: class Foo extends Bar
12
+ (superclass
13
+ (type_identifier) @ref.target_extends) @ref.type_extends
14
+
15
+ ; Class implements: class Foo implements Bar, Baz
16
+ (interfaces
17
+ (type_identifier) @ref.target_implements) @ref.type_implements
18
+
19
+ ; Mixin with: class Foo with MixinA, MixinB
20
+ (mixins
21
+ (type_identifier) @ref.target_extends) @ref.type_extends
22
+
23
+ ; Method calls
24
+ (method_invocation
25
+ name: (identifier) @ref.target_call) @ref.type_call
26
+
27
+ ; Function calls
28
+ (function_expression_body
29
+ (identifier) @ref.target_call) @ref.type_call
30
+
31
+ ; Constructor invocation / instantiation
32
+ (constructor_invocation
33
+ (type_identifier) @ref.target_instantiation) @ref.type_instantiation
@@ -0,0 +1,38 @@
1
+ ; Dart Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_definition
5
+ name: (type_identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Enums
8
+ (enum_declaration
9
+ name: (type_identifier) @symbol.name) @symbol.kind_enum
10
+
11
+ ; Mixins
12
+ (mixin_declaration
13
+ name: (type_identifier) @symbol.name) @symbol.kind_trait
14
+
15
+ ; Extensions
16
+ (extension_declaration
17
+ name: (type_identifier) @symbol.name) @symbol.kind_class
18
+
19
+ ; Functions
20
+ (function_signature
21
+ name: (identifier) @symbol.name) @symbol.kind_function
22
+
23
+ ; Methods
24
+ (method_signature
25
+ name: (identifier) @symbol.name) @symbol.kind_method
26
+
27
+ ; Constructor declarations
28
+ (constructor_signature
29
+ name: (identifier) @symbol.name) @symbol.kind_method
30
+
31
+ ; Top-level constant/variable declarations
32
+ (top_level_definition
33
+ (final_builtin_declaration
34
+ (identifier) @symbol.name)) @symbol.kind_constant
35
+
36
+ (top_level_definition
37
+ (const_builtin_declaration
38
+ (identifier) @symbol.name)) @symbol.kind_constant
@@ -0,0 +1,45 @@
1
+ ; Elixir Reference Extraction Queries
2
+
3
+ ; Alias references (module imports): alias MyApp.Module
4
+ (call
5
+ target: (identifier) @_alias
6
+ (#eq? @_alias "alias")
7
+ arguments: (arguments (alias) @ref.target_import)) @ref.type_import
8
+
9
+ ; Import references: import MyApp.Module
10
+ (call
11
+ target: (identifier) @_import
12
+ (#eq? @_import "import")
13
+ arguments: (arguments (alias) @ref.target_import)) @ref.type_import
14
+
15
+ ; Use references: use GenServer
16
+ (call
17
+ target: (identifier) @_use
18
+ (#eq? @_use "use")
19
+ arguments: (arguments (alias) @ref.target_extends)) @ref.type_extends
20
+
21
+ ; Require references: require Logger
22
+ (call
23
+ target: (identifier) @_require
24
+ (#eq? @_require "require")
25
+ arguments: (arguments (alias) @ref.target_import)) @ref.type_import
26
+
27
+ ; Function calls
28
+ (call
29
+ target: (identifier) @ref.target_call) @ref.type_call
30
+
31
+ ; Remote function calls: Module.function()
32
+ (call
33
+ target: (dot
34
+ right: (identifier) @ref.target_call)) @ref.type_call
35
+
36
+ ; Pipe operator calls: value |> function()
37
+ (binary_operator
38
+ operator: "|>"
39
+ right: (identifier) @ref.target_call) @ref.type_call
40
+
41
+ ; Protocol implementation: defimpl Protocol, for: Type
42
+ (call
43
+ target: (identifier) @_defimpl
44
+ (#eq? @_defimpl "defimpl")
45
+ arguments: (arguments (alias) @ref.target_implements)) @ref.type_implements
@@ -0,0 +1,41 @@
1
+ ; Elixir Symbol Extraction Queries
2
+
3
+ ; Module definitions: defmodule MyModule do ... end
4
+ (call
5
+ target: (identifier) @_defmodule
6
+ (#eq? @_defmodule "defmodule")
7
+ arguments: (arguments (alias) @symbol.name)) @symbol.kind_module
8
+
9
+ ; Public function definitions: def foo(args) do ... end
10
+ (call
11
+ target: (identifier) @_def
12
+ (#eq? @_def "def")
13
+ arguments: (arguments (call target: (identifier) @symbol.name))) @symbol.kind_function
14
+
15
+ ; Private function definitions: defp foo(args) do ... end
16
+ (call
17
+ target: (identifier) @_defp
18
+ (#eq? @_defp "defp")
19
+ arguments: (arguments (call target: (identifier) @symbol.name))) @symbol.kind_function
20
+
21
+ ; Macro definitions: defmacro foo(args) do ... end
22
+ (call
23
+ target: (identifier) @_defmacro
24
+ (#match? @_defmacro "^defmacrop?$")
25
+ arguments: (arguments (call target: (identifier) @symbol.name))) @symbol.kind_function
26
+
27
+ ; Struct definitions: defstruct [...]
28
+ (call
29
+ target: (identifier) @_defstruct
30
+ (#eq? @_defstruct "defstruct")) @symbol.kind_struct
31
+
32
+ ; Protocol definitions: defprotocol MyProtocol do ... end
33
+ (call
34
+ target: (identifier) @_defprotocol
35
+ (#eq? @_defprotocol "defprotocol")
36
+ arguments: (arguments (alias) @symbol.name)) @symbol.kind_interface
37
+
38
+ ; Module attribute definitions: @attr value
39
+ (unary_operator
40
+ operand: (call
41
+ target: (identifier) @symbol.name)) @symbol.kind_constant
@@ -0,0 +1,22 @@
1
+ ; Go Reference Extraction Queries
2
+
3
+ ; Import statements
4
+ (import_spec path: (_) @ref.target_import) @ref.type_import
5
+
6
+ ; Function calls
7
+ (call_expression
8
+ function: (identifier) @ref.target_call) @ref.type_call
9
+
10
+ ; Method calls: obj.Method()
11
+ (call_expression
12
+ function: (selector_expression
13
+ field: (field_identifier) @ref.target_call)) @ref.type_call
14
+
15
+ ; Composite literal instantiation: Type{...}
16
+ (composite_literal
17
+ type: (type_identifier) @ref.target_instantiation) @ref.type_instantiation
18
+
19
+ ; Interface embedding: embedding a type inside an interface
20
+ (type_spec
21
+ type: (interface_type
22
+ (type_identifier) @ref.target_extends)) @ref.type_extends
@@ -0,0 +1,53 @@
1
+ ; Go Symbol Extraction Queries
2
+
3
+ ; Struct type declarations
4
+ (type_spec
5
+ name: (type_identifier) @symbol.name
6
+ type: (struct_type)) @symbol.kind_struct
7
+
8
+ ; Interface type declarations
9
+ (type_spec
10
+ name: (type_identifier) @symbol.name
11
+ type: (interface_type)) @symbol.kind_interface
12
+
13
+ ; Type alias declarations (non-struct, non-interface)
14
+ (type_spec
15
+ name: (type_identifier) @symbol.name
16
+ type: [
17
+ (type_identifier)
18
+ (pointer_type)
19
+ (slice_type)
20
+ (map_type)
21
+ (channel_type)
22
+ (function_type)
23
+ (array_type)
24
+ ]) @symbol.kind_constant
25
+
26
+ ; Function declarations
27
+ (function_declaration
28
+ name: (identifier) @symbol.name) @symbol.kind_function
29
+
30
+ ; Method declarations (with receiver)
31
+ (method_declaration
32
+ receiver: (parameter_list
33
+ (parameter_declaration
34
+ type: [
35
+ (pointer_type (type_identifier) @symbol.scope)
36
+ (type_identifier) @symbol.scope
37
+ ]
38
+ )
39
+ )
40
+ name: (field_identifier) @symbol.name
41
+ ) @symbol.kind_method
42
+
43
+ ; Constant declarations
44
+ (const_spec
45
+ name: (identifier) @symbol.name) @symbol.kind_constant
46
+
47
+ ; Package declaration
48
+ (package_clause
49
+ (package_identifier) @symbol.name) @symbol.kind_namespace
50
+
51
+ ; Variable declarations (package-level)
52
+ (var_spec
53
+ name: (identifier) @symbol.name) @symbol.kind_property
@@ -0,0 +1,32 @@
1
+ ; Java Reference Extraction Queries
2
+
3
+ ; Import declarations
4
+ (import_declaration (scoped_identifier) @ref.target_import) @ref.type_import
5
+
6
+ ; Class inheritance: class Foo extends Bar
7
+ (superclass (type_identifier) @ref.target_extends) @ref.type_extends
8
+
9
+ ; Interface implementation: class Foo implements Bar, Baz
10
+ (super_interfaces
11
+ (type_list
12
+ (type_identifier) @ref.target_implements)) @ref.type_implements
13
+
14
+ ; Interface extension: interface Foo extends Bar
15
+ (extends_interfaces
16
+ (type_list
17
+ (type_identifier) @ref.target_extends)) @ref.type_extends
18
+
19
+ ; Method calls
20
+ (method_invocation
21
+ name: (identifier) @ref.target_call) @ref.type_call
22
+
23
+ ; Object instantiation: new ClassName()
24
+ (object_creation_expression
25
+ type: (type_identifier) @ref.target_instantiation) @ref.type_instantiation
26
+
27
+ ; Annotation references: @Annotation
28
+ (marker_annotation
29
+ name: (identifier) @ref.target_call) @ref.type_call
30
+
31
+ (annotation
32
+ name: (identifier) @ref.target_call) @ref.type_call
@@ -0,0 +1,41 @@
1
+ ; Java Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_declaration name: (identifier) @symbol.name) @symbol.kind_class
5
+
6
+ ; Interfaces
7
+ (interface_declaration name: (identifier) @symbol.name) @symbol.kind_interface
8
+
9
+ ; Enums
10
+ (enum_declaration name: (identifier) @symbol.name) @symbol.kind_enum
11
+
12
+ ; Methods
13
+ (method_declaration name: (identifier) @symbol.name) @symbol.kind_method
14
+
15
+ ; Constructors
16
+ (constructor_declaration name: (identifier) @symbol.name) @symbol.kind_method
17
+
18
+ ; Field declarations
19
+ (field_declaration
20
+ declarator: (variable_declarator
21
+ name: (identifier) @symbol.name)) @symbol.kind_property
22
+
23
+ ; Constant declarations (static final)
24
+ (field_declaration
25
+ (modifiers (modifier) @_static (modifier) @_final)
26
+ declarator: (variable_declarator
27
+ name: (identifier) @symbol.name)
28
+ (#eq? @_static "static")
29
+ (#eq? @_final "final")) @symbol.kind_constant
30
+
31
+ ; Annotation type declarations
32
+ (annotation_type_declaration
33
+ name: (identifier) @symbol.name) @symbol.kind_interface
34
+
35
+ ; Enum constants
36
+ (enum_constant
37
+ name: (identifier) @symbol.name) @symbol.kind_constant
38
+
39
+ ; Package declaration (namespace)
40
+ (package_declaration
41
+ (scoped_identifier) @symbol.name) @symbol.kind_namespace
@@ -0,0 +1,14 @@
1
+ ; JavaScript Reference / Dependency Extraction
2
+
3
+ (import_statement
4
+ source: (string) @ref.target_import) @ref.type_import
5
+
6
+ (class_declaration
7
+ (class_heritage
8
+ (identifier) @ref.target_extends)) @ref.type_extends
9
+
10
+ (new_expression
11
+ constructor: (identifier) @ref.target_instantiation) @ref.type_instantiation
12
+
13
+ (call_expression
14
+ function: (identifier) @ref.target_call) @ref.type_call
@@ -0,0 +1,23 @@
1
+ ; JavaScript Symbol Extraction Queries
2
+
3
+ (function_declaration
4
+ name: (identifier) @symbol.name) @symbol.kind_function
5
+
6
+ (class_declaration
7
+ name: (identifier) @symbol.name) @symbol.kind_class
8
+
9
+ (method_definition
10
+ name: (property_identifier) @symbol.name) @symbol.kind_method
11
+
12
+ (generator_function_declaration
13
+ name: (identifier) @symbol.name) @symbol.kind_function
14
+
15
+ (lexical_declaration
16
+ (variable_declarator
17
+ name: (identifier) @symbol.name
18
+ value: [(arrow_function) (function_expression)])) @symbol.kind_function
19
+
20
+ (variable_declaration
21
+ (variable_declarator
22
+ name: (identifier) @symbol.name
23
+ value: [(arrow_function) (function_expression)])) @symbol.kind_function
@@ -0,0 +1,31 @@
1
+ ; Kotlin Reference Extraction Queries
2
+
3
+ ; Import statements
4
+ (import_header
5
+ (identifier) @ref.target_import) @ref.type_import
6
+
7
+ ; Function/method calls
8
+ (call_expression
9
+ (simple_identifier) @ref.target_call) @ref.type_call
10
+
11
+ ; Method calls on receiver: obj.method()
12
+ (call_expression
13
+ (navigation_expression
14
+ (navigation_suffix
15
+ (simple_identifier) @ref.target_call))) @ref.type_call
16
+
17
+ ; Class inheritance: class Foo : Bar()
18
+ (delegation_specifier
19
+ (constructor_invocation
20
+ (user_type
21
+ (type_identifier) @ref.target_extends))) @ref.type_extends
22
+
23
+ ; Interface implementation: class Foo : Interface
24
+ (delegation_specifier
25
+ (user_type
26
+ (type_identifier) @ref.target_implements)) @ref.type_implements
27
+
28
+ ; Object instantiation: ClassName()
29
+ (constructor_invocation
30
+ (user_type
31
+ (type_identifier) @ref.target_instantiation)) @ref.type_instantiation
@@ -0,0 +1,24 @@
1
+ ; Kotlin Symbol Extraction Queries
2
+
3
+ ; Classes
4
+ (class_declaration
5
+ (type_identifier) @symbol.name) @symbol.kind_class
6
+
7
+ ; Interfaces
8
+ ; TODO: Add an interface-specific pattern for tree-sitter-kotlin. The previous query matched all class_declaration nodes and produced duplicates.
9
+ ; Object declarations (singletons)
10
+ (object_declaration
11
+ (type_identifier) @symbol.name) @symbol.kind_class
12
+
13
+ ; Functions
14
+ (function_declaration
15
+ (simple_identifier) @symbol.name) @symbol.kind_function
16
+
17
+ ; Property declarations
18
+ (property_declaration
19
+ (variable_declaration
20
+ (simple_identifier) @symbol.name)) @symbol.kind_property
21
+
22
+ ; Enum entries
23
+ (enum_entry
24
+ (simple_identifier) @symbol.name) @symbol.kind_constant
@@ -0,0 +1,19 @@
1
+ ; Lua Reference Extraction Queries
2
+
3
+ ; require('module')
4
+ (function_call
5
+ prefix: (identifier) @_req
6
+ arguments: (arguments (string) @ref.target_require)
7
+ (#eq? @_req "require")) @ref.type_require
8
+
9
+ ; Function calls
10
+ (function_call
11
+ prefix: [
12
+ (identifier) @ref.target_call
13
+ (dot_index_expression (identifier) @ref.target_call)
14
+ ]) @ref.type_call
15
+
16
+ ; Method calls: obj:method()
17
+ (function_call
18
+ prefix: (method_index_expression
19
+ method: (identifier) @ref.target_call)) @ref.type_call