gitnexus 1.6.0 → 1.6.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 (136) hide show
  1. package/dist/cli/analyze.js +28 -3
  2. package/dist/core/group/extractors/fs-utils.d.ts +10 -0
  3. package/dist/core/group/extractors/fs-utils.js +24 -0
  4. package/dist/core/group/extractors/grpc-extractor.d.ts +17 -8
  5. package/dist/core/group/extractors/grpc-extractor.js +313 -191
  6. package/dist/core/group/extractors/grpc-patterns/go.d.ts +2 -0
  7. package/dist/core/group/extractors/grpc-patterns/go.js +97 -0
  8. package/dist/core/group/extractors/grpc-patterns/index.d.ts +19 -0
  9. package/dist/core/group/extractors/grpc-patterns/index.js +46 -0
  10. package/dist/core/group/extractors/grpc-patterns/java.d.ts +2 -0
  11. package/dist/core/group/extractors/grpc-patterns/java.js +173 -0
  12. package/dist/core/group/extractors/grpc-patterns/node.d.ts +4 -0
  13. package/dist/core/group/extractors/grpc-patterns/node.js +290 -0
  14. package/dist/core/group/extractors/grpc-patterns/proto.d.ts +9 -0
  15. package/dist/core/group/extractors/grpc-patterns/proto.js +134 -0
  16. package/dist/core/group/extractors/grpc-patterns/python.d.ts +2 -0
  17. package/dist/core/group/extractors/grpc-patterns/python.js +67 -0
  18. package/dist/core/group/extractors/grpc-patterns/types.d.ts +50 -0
  19. package/dist/core/group/extractors/grpc-patterns/types.js +1 -0
  20. package/dist/core/group/extractors/http-patterns/go.d.ts +2 -0
  21. package/dist/core/group/extractors/http-patterns/go.js +215 -0
  22. package/dist/core/group/extractors/http-patterns/index.d.ts +17 -0
  23. package/dist/core/group/extractors/http-patterns/index.js +44 -0
  24. package/dist/core/group/extractors/http-patterns/java.d.ts +2 -0
  25. package/dist/core/group/extractors/http-patterns/java.js +253 -0
  26. package/dist/core/group/extractors/http-patterns/node.d.ts +4 -0
  27. package/dist/core/group/extractors/http-patterns/node.js +354 -0
  28. package/dist/core/group/extractors/http-patterns/php.d.ts +2 -0
  29. package/dist/core/group/extractors/http-patterns/php.js +70 -0
  30. package/dist/core/group/extractors/http-patterns/python.d.ts +2 -0
  31. package/dist/core/group/extractors/http-patterns/python.js +133 -0
  32. package/dist/core/group/extractors/http-patterns/types.d.ts +61 -0
  33. package/dist/core/group/extractors/http-patterns/types.js +1 -0
  34. package/dist/core/group/extractors/http-route-extractor.d.ts +10 -13
  35. package/dist/core/group/extractors/http-route-extractor.js +201 -238
  36. package/dist/core/group/extractors/manifest-extractor.d.ts +54 -0
  37. package/dist/core/group/extractors/manifest-extractor.js +235 -0
  38. package/dist/core/group/extractors/topic-extractor.d.ts +0 -1
  39. package/dist/core/group/extractors/topic-extractor.js +55 -192
  40. package/dist/core/group/extractors/topic-patterns/go.d.ts +2 -0
  41. package/dist/core/group/extractors/topic-patterns/go.js +120 -0
  42. package/dist/core/group/extractors/topic-patterns/index.d.ts +14 -0
  43. package/dist/core/group/extractors/topic-patterns/index.js +38 -0
  44. package/dist/core/group/extractors/topic-patterns/java.d.ts +2 -0
  45. package/dist/core/group/extractors/topic-patterns/java.js +80 -0
  46. package/dist/core/group/extractors/topic-patterns/node.d.ts +4 -0
  47. package/dist/core/group/extractors/topic-patterns/node.js +155 -0
  48. package/dist/core/group/extractors/topic-patterns/python.d.ts +2 -0
  49. package/dist/core/group/extractors/topic-patterns/python.js +116 -0
  50. package/dist/core/group/extractors/topic-patterns/types.d.ts +25 -0
  51. package/dist/core/group/extractors/topic-patterns/types.js +10 -0
  52. package/dist/core/group/extractors/tree-sitter-scanner.d.ts +113 -0
  53. package/dist/core/group/extractors/tree-sitter-scanner.js +94 -0
  54. package/dist/core/ingestion/binding-accumulator.d.ts +22 -17
  55. package/dist/core/ingestion/binding-accumulator.js +29 -25
  56. package/dist/core/ingestion/cobol-processor.d.ts +1 -1
  57. package/dist/core/ingestion/import-processor.js +1 -1
  58. package/dist/core/ingestion/language-config.js +1 -1
  59. package/dist/core/ingestion/language-provider.d.ts +8 -0
  60. package/dist/core/ingestion/languages/ruby.js +15 -0
  61. package/dist/core/ingestion/markdown-processor.d.ts +1 -1
  62. package/dist/core/ingestion/method-extractors/configs/jvm.js +1 -0
  63. package/dist/core/ingestion/method-extractors/configs/ruby.js +1 -0
  64. package/dist/core/ingestion/method-extractors/generic.d.ts +6 -0
  65. package/dist/core/ingestion/method-extractors/generic.js +48 -4
  66. package/dist/core/ingestion/method-types.d.ts +4 -0
  67. package/dist/core/ingestion/model/resolve.js +103 -48
  68. package/dist/core/ingestion/model/semantic-model.d.ts +1 -1
  69. package/dist/core/ingestion/model/semantic-model.js +1 -1
  70. package/dist/core/ingestion/model/symbol-table.d.ts +7 -7
  71. package/dist/core/ingestion/model/symbol-table.js +7 -7
  72. package/dist/core/ingestion/mro-processor.d.ts +1 -1
  73. package/dist/core/ingestion/mro-processor.js +1 -1
  74. package/dist/core/ingestion/parsing-processor.js +54 -42
  75. package/dist/core/ingestion/pipeline-phases/cobol.d.ts +16 -0
  76. package/dist/core/ingestion/pipeline-phases/cobol.js +45 -0
  77. package/dist/core/ingestion/pipeline-phases/communities.d.ts +16 -0
  78. package/dist/core/ingestion/pipeline-phases/communities.js +62 -0
  79. package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +17 -0
  80. package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +156 -0
  81. package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +37 -0
  82. package/dist/core/ingestion/pipeline-phases/cross-file.js +63 -0
  83. package/dist/core/ingestion/pipeline-phases/index.d.ts +21 -0
  84. package/dist/core/ingestion/pipeline-phases/index.js +22 -0
  85. package/dist/core/ingestion/pipeline-phases/markdown.d.ts +17 -0
  86. package/dist/core/ingestion/pipeline-phases/markdown.js +33 -0
  87. package/dist/core/ingestion/pipeline-phases/mro.d.ts +18 -0
  88. package/dist/core/ingestion/pipeline-phases/mro.js +36 -0
  89. package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +22 -0
  90. package/dist/core/ingestion/pipeline-phases/orm-extraction.js +92 -0
  91. package/dist/core/ingestion/pipeline-phases/orm.d.ts +15 -0
  92. package/dist/core/ingestion/pipeline-phases/orm.js +74 -0
  93. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +47 -0
  94. package/dist/core/ingestion/pipeline-phases/parse-impl.js +437 -0
  95. package/dist/core/ingestion/pipeline-phases/parse.d.ts +49 -0
  96. package/dist/core/ingestion/pipeline-phases/parse.js +33 -0
  97. package/dist/core/ingestion/pipeline-phases/processes.d.ts +16 -0
  98. package/dist/core/ingestion/pipeline-phases/processes.js +143 -0
  99. package/dist/core/ingestion/pipeline-phases/routes.d.ts +21 -0
  100. package/dist/core/ingestion/pipeline-phases/routes.js +243 -0
  101. package/dist/core/ingestion/pipeline-phases/runner.d.ts +22 -0
  102. package/dist/core/ingestion/pipeline-phases/runner.js +203 -0
  103. package/dist/core/ingestion/pipeline-phases/scan.d.ts +21 -0
  104. package/dist/core/ingestion/pipeline-phases/scan.js +46 -0
  105. package/dist/core/ingestion/pipeline-phases/structure.d.ts +27 -0
  106. package/dist/core/ingestion/pipeline-phases/structure.js +35 -0
  107. package/dist/core/ingestion/pipeline-phases/tools.d.ts +20 -0
  108. package/dist/core/ingestion/pipeline-phases/tools.js +79 -0
  109. package/dist/core/ingestion/pipeline-phases/types.d.ts +79 -0
  110. package/dist/core/ingestion/pipeline-phases/types.js +37 -0
  111. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +35 -0
  112. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +174 -0
  113. package/dist/core/ingestion/pipeline.d.ts +16 -10
  114. package/dist/core/ingestion/pipeline.js +66 -1534
  115. package/dist/core/ingestion/process-processor.js +1 -1
  116. package/dist/core/ingestion/tree-sitter-queries.d.ts +2 -2
  117. package/dist/core/ingestion/tree-sitter-queries.js +69 -0
  118. package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -3
  119. package/dist/core/ingestion/utils/ast-helpers.js +48 -21
  120. package/dist/core/ingestion/utils/env.d.ts +10 -0
  121. package/dist/core/ingestion/utils/env.js +10 -0
  122. package/dist/core/ingestion/utils/graph-sort.d.ts +58 -0
  123. package/dist/core/ingestion/utils/graph-sort.js +100 -0
  124. package/dist/core/ingestion/workers/parse-worker.js +12 -8
  125. package/dist/core/lbug/lbug-adapter.js +66 -24
  126. package/package.json +3 -3
  127. package/vendor/tree-sitter-proto/binding.gyp +30 -0
  128. package/vendor/tree-sitter-proto/bindings/node/binding.cc +20 -0
  129. package/vendor/tree-sitter-proto/bindings/node/index.d.ts +28 -0
  130. package/vendor/tree-sitter-proto/bindings/node/index.js +7 -0
  131. package/vendor/tree-sitter-proto/package.json +18 -0
  132. package/vendor/tree-sitter-proto/src/node-types.json +1145 -0
  133. package/vendor/tree-sitter-proto/src/parser.c +10149 -0
  134. package/vendor/tree-sitter-proto/src/tree_sitter/alloc.h +54 -0
  135. package/vendor/tree-sitter-proto/src/tree_sitter/array.h +291 -0
  136. package/vendor/tree-sitter-proto/src/tree_sitter/parser.h +266 -0
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { calculateEntryPointScore, isTestFile } from './entry-point-scoring.js';
13
13
  import { SupportedLanguages } from '../../_shared/index.js';
14
- const isDev = process.env.NODE_ENV === 'development';
14
+ import { isDev } from './utils/env.js';
15
15
  const DEFAULT_CONFIG = {
16
16
  maxTraceDepth: 10,
17
17
  maxBranching: 4,
@@ -1,4 +1,4 @@
1
- export declare const TYPESCRIPT_QUERIES = "\n(class_declaration\n name: (type_identifier) @name) @definition.class\n\n(abstract_class_declaration\n name: (type_identifier) @name) @definition.class\n\n(interface_declaration\n name: (type_identifier) @name) @definition.interface\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n; TypeScript overload signatures (function_signature is a separate node type from function_declaration)\n(function_signature\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n; ES2022 #private methods (private_property_identifier not matched by property_identifier)\n(method_definition\n name: (private_property_identifier) @name) @definition.method\n\n; Abstract method signatures in abstract classes\n(abstract_method_signature\n name: (property_identifier) @name) @definition.method\n\n; Interface method signatures\n(method_signature\n name: (property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class properties \u2014 public_field_definition covers most TS class fields\n(public_field_definition\n name: (property_identifier) @name) @definition.property\n\n; Private class fields: #address: Address\n(public_field_definition\n name: (private_property_identifier) @name) @definition.property\n\n; Constructor parameter properties: constructor(public address: Address)\n(required_parameter\n (accessibility_modifier)\n pattern: (identifier) @name) @definition.property\n\n; Heritage queries - class extends\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (extends_clause\n value: (identifier) @heritage.extends))) @heritage\n\n; Heritage queries - class implements interface\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (implements_clause\n (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n; fetch() \u2014 global function\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post/put/delete/patch('/path'), $.get/post/ajax({url:'/path'})\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Decorators: @Controller, @Get, @Post, etc.\n(decorator\n (call_expression\n function: (identifier) @decorator.name\n arguments: (arguments (string (string_fragment) @decorator.arg)?))) @decorator\n\n; Express/Hono route registration: app.get('/path', handler), router.post('/path', fn)\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
1
+ export declare const TYPESCRIPT_QUERIES = "\n(class_declaration\n name: (type_identifier) @name) @definition.class\n\n(abstract_class_declaration\n name: (type_identifier) @name) @definition.class\n\n(interface_declaration\n name: (type_identifier) @name) @definition.interface\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n; TypeScript overload signatures (function_signature is a separate node type from function_declaration)\n(function_signature\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n; ES2022 #private methods (private_property_identifier not matched by property_identifier)\n(method_definition\n name: (private_property_identifier) @name) @definition.method\n\n; Abstract method signatures in abstract classes\n(abstract_method_signature\n name: (property_identifier) @name) @definition.method\n\n; Interface method signatures\n(method_signature\n name: (property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Generic awaited free call: await fn<T>(args)\n; tree-sitter-typescript parses \"await fn<T>(args)\" as a call_expression whose\n; \"function\" field is an await_expression (not a bare identifier), because the\n; grammar resolves the ambiguity between generics and comparisons by consuming\n; \"await fn\" as an expression before attaching <T> as type_arguments.\n(call_expression\n function: (await_expression\n (identifier) @call.name)\n (type_arguments)) @call\n\n; Generic awaited member call: await obj.fn<T>(args)\n(call_expression\n function: (await_expression\n (member_expression\n property: (property_identifier) @call.name))\n (type_arguments)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class properties \u2014 public_field_definition covers most TS class fields\n(public_field_definition\n name: (property_identifier) @name) @definition.property\n\n; Private class fields: #address: Address\n(public_field_definition\n name: (private_property_identifier) @name) @definition.property\n\n; Constructor parameter properties: constructor(public address: Address)\n(required_parameter\n (accessibility_modifier)\n pattern: (identifier) @name) @definition.property\n\n; Heritage queries - class extends\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (extends_clause\n value: (identifier) @heritage.extends))) @heritage\n\n; Heritage queries - class implements interface\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (implements_clause\n (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n; fetch() \u2014 global function\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post/put/delete/patch('/path'), $.get/post/ajax({url:'/path'})\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Decorators: @Controller, @Get, @Post, etc.\n(decorator\n (call_expression\n function: (identifier) @decorator.name\n arguments: (arguments (string (string_fragment) @decorator.arg)?))) @decorator\n\n; Express/Hono route registration: app.get('/path', handler), router.post('/path', fn)\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
2
2
  export declare const JAVASCRIPT_QUERIES = "\n(class_declaration\n name: (identifier) @name) @definition.class\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n; ES2022 #private methods\n(method_definition\n name: (private_property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class fields \u2014 field_definition captures JS class fields (class User { address = ... })\n(field_definition\n property: (property_identifier) @name) @definition.property\n\n; Heritage queries - class extends (JavaScript uses different AST than TypeScript)\n; In tree-sitter-javascript, class_heritage directly contains the parent identifier\n(class_declaration\n name: (identifier) @heritage.class\n (class_heritage\n (identifier) @heritage.extends)) @heritage\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post, $.get/post/ajax\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Express/Hono route registration\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
3
3
  export declare const PYTHON_QUERIES = "\n(class_definition\n name: (identifier) @name) @definition.class\n\n(function_definition\n name: (identifier) @name) @definition.function\n\n(import_statement\n name: (dotted_name) @import.source) @import\n\n; import numpy as np \u2192 aliased_import captures the module name so the\n; import path is resolved and named-binding extraction stores \"np\" \u2192 \"numpy\".\n(import_statement\n name: (aliased_import\n name: (dotted_name) @import.source)) @import\n\n(import_from_statement\n module_name: (dotted_name) @import.source) @import\n\n(import_from_statement\n module_name: (relative_import) @import.source) @import\n\n(call\n function: (identifier) @call.name) @call\n\n(call\n function: (attribute\n attribute: (identifier) @call.name)) @call\n\n; Class attribute type annotations \u2014 PEP 526: address: Address or address: Address = Address()\n; Both bare annotations (address: Address) and annotated assignments (name: str = \"test\")\n; are parsed as (assignment left: ... type: ...) in tree-sitter-python.\n(expression_statement\n (assignment\n left: (identifier) @name\n type: (type)) @definition.property)\n\n; Heritage queries - Python class inheritance\n(class_definition\n name: (identifier) @heritage.class\n superclasses: (argument_list\n (identifier) @heritage.extends)) @heritage\n\n; Write access: obj.field = value\n(assignment\n left: (attribute\n object: (_) @assignment.receiver\n attribute: (identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment\n left: (attribute\n object: (_) @assignment.receiver\n attribute: (identifier) @assignment.property)\n right: (_)) @assignment\n\n; Python HTTP clients: requests.get('/path'), httpx.post('/path'), session.get('/path')\n(call\n function: (attribute\n attribute: (identifier) @http_client.method)\n arguments: (argument_list\n (string (string_content) @http_client.url))) @http_client\n\n; Python decorators: @app.route, @router.get, etc.\n(decorator\n (call\n function: (attribute\n object: (identifier) @decorator.receiver\n attribute: (identifier) @decorator.name)\n arguments: (argument_list\n (string (string_content) @decorator.arg)?))) @decorator\n";
4
4
  export declare const JAVA_QUERIES = "\n; Classes, Interfaces, Enums, Annotations\n(class_declaration name: (identifier) @name) @definition.class\n(interface_declaration name: (identifier) @name) @definition.interface\n(enum_declaration name: (identifier) @name) @definition.enum\n(annotation_type_declaration name: (identifier) @name) @definition.annotation\n\n; Methods & Constructors\n(method_declaration name: (identifier) @name) @definition.method\n(constructor_declaration name: (identifier) @name) @definition.constructor\n\n; Fields \u2014 typed field declarations inside class bodies\n(field_declaration\n declarator: (variable_declarator\n name: (identifier) @name)) @definition.property\n\n; Imports - capture any import declaration child as source\n(import_declaration (_) @import.source) @import\n\n; Calls\n(method_invocation name: (identifier) @call.name) @call\n(method_invocation object: (_) name: (identifier) @call.name) @call\n(method_reference) @call\n\n; Constructor calls: new Foo()\n(object_creation_expression type: (type_identifier) @call.name) @call\n\n; Heritage - extends class\n(class_declaration name: (identifier) @heritage.class\n (superclass (type_identifier) @heritage.extends)) @heritage\n\n; Heritage - implements interfaces\n(class_declaration name: (identifier) @heritage.class\n (super_interfaces (type_list (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (field_access\n object: (_) @assignment.receiver\n field: (identifier) @assignment.property)\n right: (_)) @assignment\n";
@@ -11,6 +11,6 @@ export declare const PHP_QUERIES = "\n; \u2500\u2500 Namespace \u2500\u2500\u250
11
11
  export declare const RUBY_QUERIES = "\n; \u2500\u2500 Modules \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(module\n name: (constant) @name) @definition.module\n\n; \u2500\u2500 Classes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class\n name: (constant) @name) @definition.class\n\n; \u2500\u2500 Instance methods \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method\n name: (identifier) @name) @definition.method\n\n; \u2500\u2500 Singleton (class-level) methods \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(singleton_method\n name: (identifier) @name) @definition.method\n\n; \u2500\u2500 All calls (require, include, attr_*, and regular calls routed in JS) \u2500\u2500\u2500\u2500\u2500\n(call\n method: (identifier) @call.name) @call\n\n; \u2500\u2500 Bare calls without parens (identifiers at statement level are method calls) \u2500\n; NOTE: This may over-capture variable reads as calls (e.g. 'result' at\n; statement level). Ruby's grammar makes bare identifiers ambiguous \u2014 they\n; could be local variables or zero-arity method calls. Post-processing via\n; provider.isBuiltInName and symbol resolution filtering suppresses most false\n; positives, but a variable name that coincidentally matches a method name\n; elsewhere may produce a false CALLS edge.\n(body_statement\n (identifier) @call.name @call)\n\n; \u2500\u2500 Heritage: class < SuperClass \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class\n name: (constant) @heritage.class\n superclass: (superclass\n (constant) @heritage.extends)) @heritage\n\n; Write access: obj.field = value (Ruby setter \u2014 syntactically a method call to field=)\n(assignment\n left: (call\n receiver: (_) @assignment.receiver\n method: (identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment \u2014 operator_assignment node, not assignment)\n(operator_assignment\n left: (call\n receiver: (_) @assignment.receiver\n method: (identifier) @assignment.property)\n right: (_)) @assignment\n";
12
12
  export declare const KOTLIN_QUERIES = "\n; \u2500\u2500 Interfaces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; tree-sitter-kotlin (fwcd) has no interface_declaration node type.\n; Interfaces are class_declaration nodes with an anonymous \"interface\" keyword child.\n(class_declaration\n \"interface\"\n (type_identifier) @name) @definition.interface\n\n; \u2500\u2500 Classes (regular, data, sealed, enum) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; All have the anonymous \"class\" keyword child. enum class has both\n; \"enum\" and \"class\" children \u2014 the \"class\" child still matches.\n(class_declaration\n \"class\"\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Object declarations (Kotlin singletons) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(object_declaration\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Companion objects (named only) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(companion_object\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Functions (top-level, member, extension) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(function_declaration\n (simple_identifier) @name) @definition.function\n\n; \u2500\u2500 Properties \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(property_declaration\n (variable_declaration\n (simple_identifier) @name)) @definition.property\n\n; Primary constructor val/var parameters (data class, value class, regular class)\n; binding_pattern_kind contains \"val\" or \"var\" \u2014 without it, the param is not a property\n(class_parameter\n (binding_pattern_kind)\n (simple_identifier) @name) @definition.property\n\n; \u2500\u2500 Enum entries \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_entry\n (simple_identifier) @name) @definition.enum\n\n; \u2500\u2500 Type aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(type_alias\n (type_identifier) @name) @definition.type\n\n; \u2500\u2500 Imports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_header\n (identifier) @import.source) @import\n\n; \u2500\u2500 Function calls (direct) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(call_expression\n (simple_identifier) @call.name) @call\n\n; \u2500\u2500 Method calls (via navigation: obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(call_expression\n (navigation_expression\n (navigation_suffix\n (simple_identifier) @call.name))) @call\n\n; \u2500\u2500 Constructor invocations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(constructor_invocation\n (user_type\n (type_identifier) @call.name)) @call\n\n; \u2500\u2500 Infix function calls (e.g., a to b, x until y) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(infix_expression\n (simple_identifier) @call.name) @call\n\n; \u2500\u2500 Heritage: extends / implements via delegation_specifier \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Interface implementation (bare user_type): class Foo : Bar\n(class_declaration\n (type_identifier) @heritage.class\n (delegation_specifier\n (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Class extension (constructor_invocation): class Foo : Bar()\n(class_declaration\n (type_identifier) @heritage.class\n (delegation_specifier\n (constructor_invocation\n (user_type (type_identifier) @heritage.extends)))) @heritage\n\n; Write access: obj.field = value\n(assignment\n (directly_assignable_expression\n (_) @assignment.receiver\n (navigation_suffix\n (simple_identifier) @assignment.property))\n (_)) @assignment\n\n";
13
13
  export declare const SWIFT_QUERIES = "\n; Classes\n(class_declaration \"class\" name: (type_identifier) @name) @definition.class\n\n; Structs\n(class_declaration \"struct\" name: (type_identifier) @name) @definition.struct\n\n; Enums\n(class_declaration \"enum\" name: (type_identifier) @name) @definition.enum\n\n; Extensions (mapped to class \u2014 no dedicated label in schema)\n(class_declaration \"extension\" name: (user_type (type_identifier) @name)) @definition.class\n\n; Actors\n(class_declaration \"actor\" name: (type_identifier) @name) @definition.class\n\n; Protocols (mapped to interface)\n(protocol_declaration name: (type_identifier) @name) @definition.interface\n\n; Type aliases\n(typealias_declaration name: (type_identifier) @name) @definition.type\n\n; Functions (top-level and methods)\n(function_declaration name: (simple_identifier) @name) @definition.function\n\n; Protocol method declarations\n(protocol_function_declaration name: (simple_identifier) @name) @definition.method\n\n; Initializers\n(init_declaration) @definition.constructor\n\n; Properties (stored and computed)\n(property_declaration (pattern (simple_identifier) @name)) @definition.property\n\n; Enum cases\n(enum_entry (simple_identifier) @name) @definition.property\n\n; Imports\n(import_declaration (identifier (simple_identifier) @import.source)) @import\n\n; Calls - direct function calls\n(call_expression (simple_identifier) @call.name) @call\n\n; Calls - member/navigation calls (obj.method())\n(call_expression (navigation_expression (navigation_suffix (simple_identifier) @call.name))) @call\n\n; Heritage - class/struct/enum inheritance and protocol conformance\n(class_declaration name: (type_identifier) @heritage.class\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Heritage - protocol inheritance\n(protocol_declaration name: (type_identifier) @heritage.class\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Heritage - extension protocol conformance (e.g. extension Foo: SomeProtocol)\n; Extensions wrap the name in user_type unlike class/struct/enum declarations\n(class_declaration \"extension\" name: (user_type (type_identifier) @heritage.class)\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Write access: obj.field = value (tree-sitter-swift 0.7.1 uses named fields)\n(assignment\n target: (directly_assignable_expression\n (navigation_expression\n target: (_) @assignment.receiver\n suffix: (navigation_suffix\n suffix: (simple_identifier) @assignment.property)))\n result: (_)) @assignment\n\n";
14
- export declare const DART_QUERIES = "\n; \u2500\u2500 Classes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Mixins \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(mixin_declaration\n (identifier) @name) @definition.trait\n\n; \u2500\u2500 Extensions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(extension_declaration\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Enums \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_declaration\n name: (identifier) @name) @definition.enum\n\n; \u2500\u2500 Type aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Anchor \"=\" after the name to avoid capturing the RHS type\n(type_alias\n (type_identifier) @name\n \"=\") @definition.type\n\n; \u2500\u2500 Top-level functions (parent is program, not method_signature) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(program\n (function_signature\n name: (identifier) @name) @definition.function)\n\n; \u2500\u2500 Abstract method declarations (function_signature inside class body declaration) \u2500\u2500\n(declaration\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Methods (inside class/mixin/extension bodies) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Constructors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(constructor_signature\n name: (identifier) @name) @definition.constructor\n\n; \u2500\u2500 Factory constructors (anchor before param list to capture variant name, not class) \u2500\u2500\n(method_signature\n (factory_constructor_signature\n (identifier) @name . (formal_parameter_list))) @definition.constructor\n\n; \u2500\u2500 Field declarations (String name = '', Address address = Address()) \u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (type_identifier)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Nullable field declarations (String? name) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (nullable_type)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Getters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (getter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Setters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (setter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Imports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_import\n (import_specification\n (configurable_uri) @import.source))) @import\n\n; \u2500\u2500 Calls: direct function/constructor calls (identifier immediately before argument_part) \u2500\u2500\n(expression_statement\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: method calls (obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(expression_statement\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))) @call\n\n; \u2500\u2500 Calls: in return statements (return User()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(return_statement\n (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: in variable assignments (var x = getUser()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(initialized_variable_definition\n value: (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: member calls in variable assignments (var x = obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\n(initialized_variable_definition\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))\n (selector (argument_part))) @call\n\n; \u2500\u2500 Re-exports (export 'foo.dart') \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_export\n (configurable_uri) @import.source)) @import\n\n; \u2500\u2500 Write access: obj.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (identifier) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Write access: this.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (this) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Heritage: extends \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (type_identifier) @heritage.extends)) @heritage\n\n; \u2500\u2500 Heritage: implements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n interfaces: (interfaces\n (type_identifier) @heritage.implements)) @heritage.impl\n\n; \u2500\u2500 Heritage: with (mixins) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (mixins\n (type_identifier) @heritage.trait))) @heritage\n";
14
+ export declare const DART_QUERIES = "\n; \u2500\u2500 Classes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Mixins \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(mixin_declaration\n (identifier) @name) @definition.trait\n\n; \u2500\u2500 Extensions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(extension_declaration\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Enums \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_declaration\n name: (identifier) @name) @definition.enum\n\n; \u2500\u2500 Type aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Anchor \"=\" after the name to avoid capturing the RHS type\n(type_alias\n (type_identifier) @name\n \"=\") @definition.type\n\n; \u2500\u2500 Top-level functions (parent is program, not method_signature) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(program\n (function_signature\n name: (identifier) @name) @definition.function)\n\n; \u2500\u2500 Abstract method declarations (function_signature inside class body declaration) \u2500\u2500\n(declaration\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Methods (inside class/mixin/extension bodies) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Constructors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(constructor_signature\n name: (identifier) @name) @definition.constructor\n\n; \u2500\u2500 Factory constructors (anchor before param list to capture variant name, not class) \u2500\u2500\n(method_signature\n (factory_constructor_signature\n (identifier) @name . (formal_parameter_list))) @definition.constructor\n\n; \u2500\u2500 Field declarations (String name = '', Address address = Address()) \u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (type_identifier)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Nullable field declarations (String? name) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (nullable_type)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Getters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (getter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Setters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (setter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Imports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_import\n (import_specification\n (configurable_uri) @import.source))) @import\n\n; \u2500\u2500 Calls: direct function/constructor calls (identifier immediately before argument_part) \u2500\u2500\n(expression_statement\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: method calls (obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(expression_statement\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))) @call\n\n; \u2500\u2500 Calls: in return statements (return User()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(return_statement\n (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: in variable assignments (var x = getUser()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(initialized_variable_definition\n value: (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: member calls in variable assignments (var x = obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\n(initialized_variable_definition\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: await direct (await doSomething()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(await_expression\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: await method chain (await obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Requires argument_part to distinguish method calls from field access (await obj.field)\n(await_expression\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: named argument (foo(child: buildX())) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(named_argument\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: inside list literals ([buildA(), buildB()]) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(list_literal\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: cascade (obj..add(x)..sort()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Note: cascade_selector contains identifier directly (no unconditional_assignable_selector\n; wrapper in Dart grammar), so inferCallForm() classifies these as free calls rather than\n; member calls. Cross-file resolution still benefits from the call being recorded.\n(cascade_section\n (cascade_selector (identifier) @call.name)\n (argument_part)) @call\n\n; \u2500\u2500 Calls: static final field initializers (static final _svc = MyService()) \u2500\u2500\n(static_final_declaration\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: arrow function body (=> buildWidget()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(function_body \"=>\"\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: lambda body (() => doSomething()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(function_expression_body\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Re-exports (export 'foo.dart') \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_export\n (configurable_uri) @import.source)) @import\n\n; \u2500\u2500 Write access: obj.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (identifier) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Write access: this.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (this) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Heritage: extends \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (type_identifier) @heritage.extends)) @heritage\n\n; \u2500\u2500 Heritage: implements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n interfaces: (interfaces\n (type_identifier) @heritage.implements)) @heritage.impl\n\n; \u2500\u2500 Heritage: with (mixins) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (mixins\n (type_identifier) @heritage.trait))) @heritage\n";
15
15
  import { SupportedLanguages } from '../../_shared/index.js';
16
16
  export declare const LANGUAGE_QUERIES: Record<SupportedLanguages, string>;
@@ -74,6 +74,23 @@ export const TYPESCRIPT_QUERIES = `
74
74
  function: (member_expression
75
75
  property: (property_identifier) @call.name)) @call
76
76
 
77
+ ; Generic awaited free call: await fn<T>(args)
78
+ ; tree-sitter-typescript parses "await fn<T>(args)" as a call_expression whose
79
+ ; "function" field is an await_expression (not a bare identifier), because the
80
+ ; grammar resolves the ambiguity between generics and comparisons by consuming
81
+ ; "await fn" as an expression before attaching <T> as type_arguments.
82
+ (call_expression
83
+ function: (await_expression
84
+ (identifier) @call.name)
85
+ (type_arguments)) @call
86
+
87
+ ; Generic awaited member call: await obj.fn<T>(args)
88
+ (call_expression
89
+ function: (await_expression
90
+ (member_expression
91
+ property: (property_identifier) @call.name))
92
+ (type_arguments)) @call
93
+
77
94
  ; Constructor calls: new Foo()
78
95
  (new_expression
79
96
  constructor: (identifier) @call.name) @call
@@ -1127,6 +1144,58 @@ export const DART_QUERIES = `
1127
1144
  (identifier) @call.name))
1128
1145
  (selector (argument_part))) @call
1129
1146
 
1147
+ ; ── Calls: await direct (await doSomething()) ────────────────────────────────
1148
+ (await_expression
1149
+ (identifier) @call.name
1150
+ .
1151
+ (selector (argument_part))) @call
1152
+
1153
+ ; ── Calls: await method chain (await obj.method()) ───────────────────────────
1154
+ ; Requires argument_part to distinguish method calls from field access (await obj.field)
1155
+ (await_expression
1156
+ (selector
1157
+ (unconditional_assignable_selector
1158
+ (identifier) @call.name))
1159
+ (selector (argument_part))) @call
1160
+
1161
+ ; ── Calls: named argument (foo(child: buildX())) ─────────────────────────────
1162
+ (named_argument
1163
+ (identifier) @call.name
1164
+ .
1165
+ (selector (argument_part))) @call
1166
+
1167
+ ; ── Calls: inside list literals ([buildA(), buildB()]) ───────────────────────
1168
+ (list_literal
1169
+ (identifier) @call.name
1170
+ .
1171
+ (selector (argument_part))) @call
1172
+
1173
+ ; ── Calls: cascade (obj..add(x)..sort()) ─────────────────────────────────────
1174
+ ; Note: cascade_selector contains identifier directly (no unconditional_assignable_selector
1175
+ ; wrapper in Dart grammar), so inferCallForm() classifies these as free calls rather than
1176
+ ; member calls. Cross-file resolution still benefits from the call being recorded.
1177
+ (cascade_section
1178
+ (cascade_selector (identifier) @call.name)
1179
+ (argument_part)) @call
1180
+
1181
+ ; ── Calls: static final field initializers (static final _svc = MyService()) ──
1182
+ (static_final_declaration
1183
+ (identifier) @call.name
1184
+ .
1185
+ (selector (argument_part))) @call
1186
+
1187
+ ; ── Calls: arrow function body (=> buildWidget()) ────────────────────────────
1188
+ (function_body "=>"
1189
+ (identifier) @call.name
1190
+ .
1191
+ (selector (argument_part))) @call
1192
+
1193
+ ; ── Calls: lambda body (() => doSomething()) ─────────────────────────────────
1194
+ (function_expression_body
1195
+ (identifier) @call.name
1196
+ .
1197
+ (selector (argument_part))) @call
1198
+
1130
1199
  ; ── Re-exports (export 'foo.dart') ───────────────────────────────────────────
1131
1200
  (import_or_export
1132
1201
  (library_export
@@ -43,9 +43,7 @@ export interface EnclosingClassInfo {
43
43
  classId: string;
44
44
  className: string;
45
45
  }
46
- /** Walk up AST to find enclosing class/struct/interface/impl, return its ID and name.
47
- * For Go method_declaration nodes, extracts receiver type (e.g. `func (u *User) Save()` → User struct). */
48
- export declare const findEnclosingClassInfo: (node: SyntaxNode, filePath: string) => EnclosingClassInfo | null;
46
+ export declare const findEnclosingClassInfo: (node: SyntaxNode, filePath: string, resolveEnclosingOwner?: (node: SyntaxNode) => SyntaxNode | null) => EnclosingClassInfo | null;
49
47
  /** Convenience wrapper: returns just the class ID string (backward compat). */
50
48
  export declare const findEnclosingClassId: (node: SyntaxNode, filePath: string) => string | null;
51
49
  /**
@@ -209,10 +209,34 @@ export function getLabelFromCaptures(captureMap, provider) {
209
209
  return 'CodeElement';
210
210
  }
211
211
  /** Walk up AST to find enclosing class/struct/interface/impl, return its ID and name.
212
- * For Go method_declaration nodes, extracts receiver type (e.g. `func (u *User) Save()` → User struct). */
213
- export const findEnclosingClassInfo = (node, filePath) => {
212
+ * For Go method_declaration nodes, extracts receiver type (e.g. `func (u *User) Save()` → User struct).
213
+ *
214
+ * @param resolveEnclosingOwner Optional language-specific hook for container remapping.
215
+ * When provided and a CLASS_CONTAINER_TYPES node is found, this hook is called:
216
+ * - Return a different SyntaxNode to remap the container (e.g., Ruby singleton_class → class).
217
+ * - Return `null` to skip this container and keep walking up.
218
+ * - Return the input node (identity) to use the container as-is.
219
+ * When omitted, the container node is used as-is.
220
+ *
221
+ * INVARIANT: Implementers SHOULD return either `null`, the input node, or
222
+ * another CLASS_CONTAINER_TYPES node. Returning a non-container node is
223
+ * permitted but discouraged — it will cause the walk to skip the current
224
+ * container and continue from the redirected node's parent. The
225
+ * `MAX_ENCLOSING_WALK_ITERATIONS` defense-in-depth guard below prevents
226
+ * pathological hooks from creating an infinite loop. */
227
+ const MAX_ENCLOSING_WALK_ITERATIONS = 4096;
228
+ export const findEnclosingClassInfo = (node, filePath, resolveEnclosingOwner) => {
214
229
  let current = node.parent;
230
+ let iterations = 0;
231
+ // Tracks container nodes already visited via the hook so a misbehaving hook
232
+ // that keeps redirecting back to the same container cannot loop forever.
233
+ const visitedContainers = new Set();
215
234
  while (current) {
235
+ if (++iterations > MAX_ENCLOSING_WALK_ITERATIONS) {
236
+ // Defense-in-depth: a real source tree has nowhere near this many ancestors.
237
+ // Bail out rather than hang ingestion.
238
+ return null;
239
+ }
216
240
  // Go: method_declaration has a receiver parameter with the struct type
217
241
  if (current.type === 'method_declaration') {
218
242
  const receiver = current.childForFieldName?.('receiver');
@@ -250,6 +274,28 @@ export const findEnclosingClassInfo = (node, filePath) => {
250
274
  }
251
275
  }
252
276
  if (CLASS_CONTAINER_TYPES.has(current.type)) {
277
+ // Delegate language-specific container remapping to the provider hook.
278
+ if (resolveEnclosingOwner) {
279
+ if (visitedContainers.has(current)) {
280
+ // We've already asked the hook about this container once — a loop
281
+ // would form (e.g., hook redirects to a child node whose parent is
282
+ // this same container). Skip and walk up.
283
+ current = current.parent;
284
+ continue;
285
+ }
286
+ visitedContainers.add(current);
287
+ const resolved = resolveEnclosingOwner(current);
288
+ if (resolved === null) {
289
+ // Provider says skip this container — keep walking up.
290
+ current = current.parent;
291
+ continue;
292
+ }
293
+ if (resolved !== current) {
294
+ // Provider remapped to a different node — re-evaluate from there.
295
+ current = resolved;
296
+ continue;
297
+ }
298
+ }
253
299
  // Rust impl_item: for `impl Trait for Struct {}`, pick the type after `for`
254
300
  // NOTE: This impl_item ownership logic is duplicated in rust.ts:extractOwnerName.
255
301
  // If modifying this block, update the other location too.
@@ -277,25 +323,6 @@ export const findEnclosingClassInfo = (node, filePath) => {
277
323
  };
278
324
  }
279
325
  }
280
- // Ruby singleton_class (class << self): walk up to the enclosing class/module
281
- // to inherit its name. singleton_class has no name field — its receiver is
282
- // `self` (node type 'self'), not 'identifier' or 'constant'.
283
- if (current.type === 'singleton_class') {
284
- let ancestor = current.parent;
285
- while (ancestor) {
286
- if (ancestor.type === 'class' || ancestor.type === 'module') {
287
- const classNameNode = ancestor.childForFieldName?.('name');
288
- if (classNameNode) {
289
- return {
290
- classId: generateId('Class', `${filePath}:${classNameNode.text}`),
291
- className: classNameNode.text,
292
- };
293
- }
294
- }
295
- ancestor = ancestor.parent;
296
- }
297
- // No enclosing class/module — skip singleton_class and keep walking up
298
- }
299
326
  const nameNode = current.childForFieldName?.('name') ??
300
327
  current.children?.find((c) => c.type === 'type_identifier' ||
301
328
  c.type === 'identifier' ||
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Environment constants shared across the ingestion module.
3
+ *
4
+ * Centralizes `isDev` so every file in `ingestion/` imports from
5
+ * one canonical location rather than re-declaring the check.
6
+ *
7
+ * @module
8
+ */
9
+ /** Whether we're running in development mode (enables verbose console logging). */
10
+ export declare const isDev: boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Environment constants shared across the ingestion module.
3
+ *
4
+ * Centralizes `isDev` so every file in `ingestion/` imports from
5
+ * one canonical location rather than re-declaring the check.
6
+ *
7
+ * @module
8
+ */
9
+ /** Whether we're running in development mode (enables verbose console logging). */
10
+ export const isDev = process.env.NODE_ENV === 'development';
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Topological level sort for file-level import graphs.
3
+ *
4
+ * Groups files into topological levels where files within the same level
5
+ * have no mutual import dependencies and can be processed in parallel.
6
+ * Files involved in import cycles are appended as a final group and
7
+ * processed last in an undefined order (best-effort propagation).
8
+ *
9
+ * Used by cross-file binding propagation to process files in the correct
10
+ * order — upstream exports must be resolved before downstream importers.
11
+ *
12
+ * @module
13
+ */
14
+ /** A group of files with no mutual dependencies, safe to process in parallel. */
15
+ export type IndependentFileGroup = readonly string[];
16
+ /**
17
+ * Groups files by topological level using Kahn's algorithm on the **reverse**
18
+ * import graph.
19
+ *
20
+ * Files in the same level have no mutual dependencies — safe to process in parallel.
21
+ * Files involved in import cycles are appended as a final level and processed
22
+ * last in an undefined order (best-effort propagation, no ordering guarantees).
23
+ *
24
+ * ## Why the counter is named `pendingImportsPerFile` (not `inDegree`)
25
+ *
26
+ * Cross-file binding propagation must process **leaves first** — a file's
27
+ * imports must be resolved before the file itself is re-resolved. To get
28
+ * leaves first from Kahn's algorithm, we run Kahn's on the **reverse** of
29
+ * the import graph:
30
+ *
31
+ * - `importMap` is `importer → {imports}` (forward edges point at deps).
32
+ * - The reverse graph has edges `dep → {importers}`, materialized in
33
+ * `reverseDeps`.
34
+ * - On the reverse graph, "in-degree of node X" equals "number of imports X
35
+ * has in the forward graph" — i.e. X's forward **out-degree**.
36
+ *
37
+ * So `pendingImportsPerFile.get(file)` counts how many of `file`'s imports
38
+ * are still un-emitted. A file is ready (level 0 / appended to `currentLevel`)
39
+ * once all its imports have been emitted in earlier levels — that is, once
40
+ * its pending-imports count drops to 0. Pairing this counter with
41
+ * `reverseDeps` (dep → importers) is the standard Kahn's-on-the-reverse-graph
42
+ * formulation; it is **not** a bug to be "fixed" by counting forward
43
+ * in-degree (importers per file).
44
+ *
45
+ * **Do not rename this back to `inDegree` and do not invert the counting
46
+ * direction.** Doing either flips the emission order from leaves-first to
47
+ * roots-first, which silently breaks cross-file binding propagation
48
+ * (downstream files would be re-resolved before their upstream exports
49
+ * are available).
50
+ *
51
+ * @param importMap Map of file → set of files it imports (forward graph)
52
+ * @returns Levels (topologically ordered groups, leaves first)
53
+ * and count of files in cycles
54
+ */
55
+ export declare function topologicalLevelSort(importMap: ReadonlyMap<string, ReadonlySet<string>>): {
56
+ levels: readonly IndependentFileGroup[];
57
+ cycleCount: number;
58
+ };
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Topological level sort for file-level import graphs.
3
+ *
4
+ * Groups files into topological levels where files within the same level
5
+ * have no mutual import dependencies and can be processed in parallel.
6
+ * Files involved in import cycles are appended as a final group and
7
+ * processed last in an undefined order (best-effort propagation).
8
+ *
9
+ * Used by cross-file binding propagation to process files in the correct
10
+ * order — upstream exports must be resolved before downstream importers.
11
+ *
12
+ * @module
13
+ */
14
+ /**
15
+ * Groups files by topological level using Kahn's algorithm on the **reverse**
16
+ * import graph.
17
+ *
18
+ * Files in the same level have no mutual dependencies — safe to process in parallel.
19
+ * Files involved in import cycles are appended as a final level and processed
20
+ * last in an undefined order (best-effort propagation, no ordering guarantees).
21
+ *
22
+ * ## Why the counter is named `pendingImportsPerFile` (not `inDegree`)
23
+ *
24
+ * Cross-file binding propagation must process **leaves first** — a file's
25
+ * imports must be resolved before the file itself is re-resolved. To get
26
+ * leaves first from Kahn's algorithm, we run Kahn's on the **reverse** of
27
+ * the import graph:
28
+ *
29
+ * - `importMap` is `importer → {imports}` (forward edges point at deps).
30
+ * - The reverse graph has edges `dep → {importers}`, materialized in
31
+ * `reverseDeps`.
32
+ * - On the reverse graph, "in-degree of node X" equals "number of imports X
33
+ * has in the forward graph" — i.e. X's forward **out-degree**.
34
+ *
35
+ * So `pendingImportsPerFile.get(file)` counts how many of `file`'s imports
36
+ * are still un-emitted. A file is ready (level 0 / appended to `currentLevel`)
37
+ * once all its imports have been emitted in earlier levels — that is, once
38
+ * its pending-imports count drops to 0. Pairing this counter with
39
+ * `reverseDeps` (dep → importers) is the standard Kahn's-on-the-reverse-graph
40
+ * formulation; it is **not** a bug to be "fixed" by counting forward
41
+ * in-degree (importers per file).
42
+ *
43
+ * **Do not rename this back to `inDegree` and do not invert the counting
44
+ * direction.** Doing either flips the emission order from leaves-first to
45
+ * roots-first, which silently breaks cross-file binding propagation
46
+ * (downstream files would be re-resolved before their upstream exports
47
+ * are available).
48
+ *
49
+ * @param importMap Map of file → set of files it imports (forward graph)
50
+ * @returns Levels (topologically ordered groups, leaves first)
51
+ * and count of files in cycles
52
+ */
53
+ export function topologicalLevelSort(importMap) {
54
+ // Per-file count of imports that have not yet been emitted in an earlier
55
+ // level. See JSDoc above for why this is **not** standard `inDegree`.
56
+ const pendingImportsPerFile = new Map();
57
+ const reverseDeps = new Map();
58
+ for (const [file, deps] of importMap) {
59
+ if (!pendingImportsPerFile.has(file))
60
+ pendingImportsPerFile.set(file, 0);
61
+ for (const dep of deps) {
62
+ if (!pendingImportsPerFile.has(dep))
63
+ pendingImportsPerFile.set(dep, 0);
64
+ pendingImportsPerFile.set(file, (pendingImportsPerFile.get(file) ?? 0) + 1);
65
+ let rev = reverseDeps.get(dep);
66
+ if (!rev) {
67
+ rev = [];
68
+ reverseDeps.set(dep, rev);
69
+ }
70
+ rev.push(file);
71
+ }
72
+ }
73
+ const levels = [];
74
+ // Level 0: files with no un-emitted imports (true leaves of the import graph).
75
+ let currentLevel = [...pendingImportsPerFile.entries()]
76
+ .filter(([, d]) => d === 0)
77
+ .map(([f]) => f);
78
+ while (currentLevel.length > 0) {
79
+ levels.push(currentLevel);
80
+ const nextLevel = [];
81
+ for (const file of currentLevel) {
82
+ // For each importer of `file`, one of its pending imports just got
83
+ // emitted — decrement the importer's pending count. If it hits 0,
84
+ // the importer is ready for the next level.
85
+ for (const dependent of reverseDeps.get(file) ?? []) {
86
+ const newPending = (pendingImportsPerFile.get(dependent) ?? 1) - 1;
87
+ pendingImportsPerFile.set(dependent, newPending);
88
+ if (newPending === 0)
89
+ nextLevel.push(dependent);
90
+ }
91
+ }
92
+ currentLevel = nextLevel;
93
+ }
94
+ // Anything still > 0 participates in a cycle — append in undefined order.
95
+ const cycleFiles = [...pendingImportsPerFile.entries()].filter(([, d]) => d > 0).map(([f]) => f);
96
+ if (cycleFiles.length > 0) {
97
+ levels.push(cycleFiles);
98
+ }
99
+ return { levels, cycleCount: cycleFiles.length };
100
+ }
@@ -286,7 +286,7 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
286
286
  finalLabel = override;
287
287
  }
288
288
  // Qualify with enclosing class to match definition-phase node IDs
289
- const classInfo = cachedFindEnclosingClassInfo(current, filePath);
289
+ const classInfo = cachedFindEnclosingClassInfo(current, filePath, provider.resolveEnclosingOwner);
290
290
  const qualifiedName = classInfo ? `${classInfo.className}.${funcName}` : funcName;
291
291
  // Include #<arity> suffix to match definition-phase Method/Constructor IDs.
292
292
  // Use the same MethodExtractor (getMethodInfo) as the definition phase.
@@ -334,7 +334,7 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
334
334
  finalLabel = override;
335
335
  }
336
336
  // Qualify custom result with enclosing class
337
- const classInfo = cachedFindEnclosingClassInfo(current.previousSibling ?? current, filePath);
337
+ const classInfo = cachedFindEnclosingClassInfo(current.previousSibling ?? current, filePath, provider.resolveEnclosingOwner);
338
338
  const qualifiedName = classInfo
339
339
  ? `${classInfo.className}.${customResult.funcName}`
340
340
  : customResult.funcName;
@@ -378,11 +378,11 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
378
378
  return null;
379
379
  };
380
380
  /** Cached wrapper for findEnclosingClassInfo — avoids repeated parent walks. */
381
- const cachedFindEnclosingClassInfo = (node, filePath) => {
381
+ const cachedFindEnclosingClassInfo = (node, filePath, resolveEnclosingOwner) => {
382
382
  const cached = classIdCache.get(node);
383
383
  if (cached !== undefined)
384
384
  return cached;
385
- const result = findEnclosingClassInfo(node, filePath);
385
+ const result = findEnclosingClassInfo(node, filePath, resolveEnclosingOwner);
386
386
  classIdCache.set(node, result);
387
387
  return result;
388
388
  };
@@ -463,7 +463,10 @@ const processBatch = (files, onProgress) => {
463
463
  }
464
464
  }
465
465
  else {
466
- regularFiles.push(...langFiles);
466
+ // Manual loop (not spread) — `push(...arr)` blows the stack on very
467
+ // large arrays when langFiles has tens of thousands of entries.
468
+ for (const f of langFiles)
469
+ regularFiles.push(f);
467
470
  }
468
471
  // Process regular files for this language
469
472
  if (regularFiles.length > 0) {
@@ -1305,7 +1308,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
1305
1308
  continue;
1306
1309
  }
1307
1310
  if (routed.kind === 'properties') {
1308
- const propEnclosingInfo = cachedFindEnclosingClassInfo(captureMap['call'], file.path);
1311
+ const propEnclosingInfo = cachedFindEnclosingClassInfo(captureMap['call'], file.path, provider.resolveEnclosingOwner);
1309
1312
  const propEnclosingClassId = propEnclosingInfo?.classId ?? null;
1310
1313
  // Enrich routed properties with FieldExtractor metadata
1311
1314
  let routedFieldMap;
@@ -1517,7 +1520,7 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
1517
1520
  nodeLabel === 'Property' ||
1518
1521
  nodeLabel === 'Function';
1519
1522
  const enclosingClassInfo = needsOwner
1520
- ? cachedFindEnclosingClassInfo(nameNode || definitionNode, file.path)
1523
+ ? cachedFindEnclosingClassInfo(nameNode || definitionNode, file.path, provider.resolveEnclosingOwner)
1521
1524
  : null;
1522
1525
  const enclosingClassId = enclosingClassInfo?.classId ?? null;
1523
1526
  // Qualify method/property IDs with enclosing class name to avoid collisions
@@ -1736,7 +1739,8 @@ const processFileGroup = (files, language, queryString, result, onFileProcessed)
1736
1739
  // Extract framework routes via provider detection (e.g., Laravel routes.php)
1737
1740
  if (provider.isRouteFile?.(file.path)) {
1738
1741
  const extractedRoutes = extractLaravelRoutes(tree, file.path);
1739
- result.routes.push(...extractedRoutes);
1742
+ for (const r of extractedRoutes)
1743
+ result.routes.push(r);
1740
1744
  }
1741
1745
  // Extract ORM queries (Prisma, Supabase)
1742
1746
  extractORMQueries(file.path, parseContent, result.ormQueries);