@colbymchenry/codegraph-win32-arm64 1.6.3 → 1.6.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.
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.js +85 -17
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/db/queries.d.ts +44 -1
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +75 -5
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/engine.d.ts +1 -1
- package/lib/dist/engine.d.ts.map +1 -1
- package/lib/dist/engine.js +2 -1
- package/lib/dist/engine.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +4 -2
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +12 -1
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +28 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +106 -0
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +11 -0
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +42 -3
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +23 -2
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.d.ts +5 -1
- package/lib/dist/extraction/kernel/loader.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +47 -2
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +193 -6
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +8 -13
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/php.d.ts +9 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -1
- package/lib/dist/extraction/languages/php.js +202 -2
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts +32 -0
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js +306 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js.map +1 -0
- package/lib/dist/extraction/parse-budget.d.ts +42 -7
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -1
- package/lib/dist/extraction/parse-budget.js +39 -2
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +1 -13
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +7 -19
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +77 -7
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +218 -18
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +9 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +17 -1
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/graph/file-drift.d.ts +35 -0
- package/lib/dist/graph/file-drift.d.ts.map +1 -0
- package/lib/dist/graph/file-drift.js +46 -0
- package/lib/dist/graph/file-drift.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +4 -1
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -2
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-references.d.ts +86 -0
- package/lib/dist/graph/symbol-references.d.ts.map +1 -0
- package/lib/dist/graph/symbol-references.js +304 -0
- package/lib/dist/graph/symbol-references.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +15 -3
- package/lib/dist/graph/test-code.d.ts.map +1 -1
- package/lib/dist/graph/test-code.js +56 -2
- package/lib/dist/graph/test-code.js.map +1 -1
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +2 -4
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/index.d.ts +24 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +42 -3
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +4 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +2 -1
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +15 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +10 -1
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +1 -1
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +2 -2
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +18 -2
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +7 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-proof.d.ts +19 -0
- package/lib/dist/mcp/daemon-proof.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-proof.js +126 -0
- package/lib/dist/mcp/daemon-proof.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +7 -2
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +14 -2
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +46 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +97 -3
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +16 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +14 -0
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.d.ts +6 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +8 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-one-symbol.d.ts +77 -0
- package/lib/dist/mcp/explore-one-symbol.d.ts.map +1 -0
- package/lib/dist/mcp/explore-one-symbol.js +431 -0
- package/lib/dist/mcp/explore-one-symbol.js.map +1 -0
- package/lib/dist/mcp/hook-client.d.ts +44 -0
- package/lib/dist/mcp/hook-client.d.ts.map +1 -0
- package/lib/dist/mcp/hook-client.js +202 -0
- package/lib/dist/mcp/hook-client.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +13 -3
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +15 -9
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/opencode-tool-names.d.ts +32 -0
- package/lib/dist/mcp/opencode-tool-names.d.ts.map +1 -0
- package/lib/dist/mcp/opencode-tool-names.js +24 -0
- package/lib/dist/mcp/opencode-tool-names.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts +6 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +21 -3
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/prompt-explore.d.ts +19 -0
- package/lib/dist/mcp/prompt-explore.d.ts.map +1 -0
- package/lib/dist/mcp/prompt-explore.js +6 -0
- package/lib/dist/mcp/prompt-explore.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +14 -7
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +71 -26
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +9 -0
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +5 -0
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +18 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +12 -1
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +19 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +42 -3
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +31 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +137 -32
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/project-config.d.ts +20 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +30 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +4 -4
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +44 -77
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts +39 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js +656 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts +62 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js +382 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +80 -34
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/elysia.d.ts +38 -0
- package/lib/dist/resolution/frameworks/elysia.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/elysia.js +683 -0
- package/lib/dist/resolution/frameworks/elysia.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts +48 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +13 -2
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +5 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +69 -11
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +2 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +164 -25
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +102 -0
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +289 -13
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +9 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +21 -1
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +25 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -1
- package/lib/dist/resolution/module-importers.js +85 -0
- package/lib/dist/resolution/module-importers.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +129 -1
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +1603 -92
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/php-web-root.d.ts +39 -0
- package/lib/dist/resolution/php-web-root.d.ts.map +1 -0
- package/lib/dist/resolution/php-web-root.js +141 -0
- package/lib/dist/resolution/php-web-root.js.map +1 -0
- package/lib/dist/resolution/python-overloads.d.ts +10 -0
- package/lib/dist/resolution/python-overloads.d.ts.map +1 -0
- package/lib/dist/resolution/python-overloads.js +75 -0
- package/lib/dist/resolution/python-overloads.js.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +60 -3
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +31 -7
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +9 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +3 -0
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
|
@@ -54,6 +54,8 @@ export declare class TreeSitterExtractor {
|
|
|
54
54
|
private fnRefCandidates;
|
|
55
55
|
private vueStoreFile;
|
|
56
56
|
private objectPathOwners;
|
|
57
|
+
private scopeDeclarations;
|
|
58
|
+
private exportedMemberFn;
|
|
57
59
|
private ownsObjects;
|
|
58
60
|
private sourceIsPreParsed;
|
|
59
61
|
private sourceAsWritten;
|
|
@@ -223,6 +225,23 @@ export declare class TreeSitterExtractor {
|
|
|
223
225
|
* Extract a function
|
|
224
226
|
*/
|
|
225
227
|
private extractFunction;
|
|
228
|
+
/**
|
|
229
|
+
* The constructor (or class) a function assigned to `Ctor.prototype.m` or
|
|
230
|
+
* `Ctor.m` is a method of, with the method's name, when `Ctor` is a function
|
|
231
|
+
* or class declared in the scope the assignment is written in (#2966) — the
|
|
232
|
+
* classic way to give a constructor its methods, and its static ones. Null
|
|
233
|
+
* for anything else: another target (`exports.x`, `app.use`, a computed
|
|
234
|
+
* key), a constructor declared elsewhere or later, a generated or minified
|
|
235
|
+
* bundle. The function must be the assignment's whole right-hand side.
|
|
236
|
+
* Mirrored in the kernel (tsjs/extractors.rs constructor_member).
|
|
237
|
+
*/
|
|
238
|
+
private constructorMember;
|
|
239
|
+
/**
|
|
240
|
+
* Extract a function assigned to `Ctor.prototype.m` / `Ctor.m` as method `m`
|
|
241
|
+
* of `Ctor`: contained by it and qualified under it (`Ctor::m`), as a class's
|
|
242
|
+
* method is, static for `Ctor.m`. Its body is walked under the method.
|
|
243
|
+
*/
|
|
244
|
+
private extractConstructorMember;
|
|
226
245
|
/**
|
|
227
246
|
* A parameter's default value is code the function runs, each time a call
|
|
228
247
|
* leaves that argument out (#2588): `function render(note = buildNote())`
|
|
@@ -403,7 +422,8 @@ export declare class TreeSitterExtractor {
|
|
|
403
422
|
* for a module-scope declaration (`valuesUnderOwner`, its initializer's calls
|
|
404
423
|
* are the constant's, #693), under the enclosing function for a local or an
|
|
405
424
|
* assignment, as they were before members had nodes. The literal's shorthand
|
|
406
|
-
* members (`{ load }`) go to the function-as-value capture the same way.
|
|
425
|
+
* members (`{ load }`) go to the function-as-value capture the same way. The
|
|
426
|
+
* members of the module's export object (`exported`) are exported.
|
|
407
427
|
*/
|
|
408
428
|
private extractOwnedObjectMembers;
|
|
409
429
|
/**
|
|
@@ -423,16 +443,41 @@ export declare class TreeSitterExtractor {
|
|
|
423
443
|
* `window.App::init`: a property is reached through its object, not through
|
|
424
444
|
* the function that happened to assign it (Lua's `M.helpers::a` reads the
|
|
425
445
|
* same way). A path on the global object is global wherever it is written,
|
|
426
|
-
* so it is also contained by the file.
|
|
427
|
-
*
|
|
428
|
-
*
|
|
446
|
+
* so it is also contained by the file. The module's own export object,
|
|
447
|
+
* `module.exports = {…}`, owns its members the same way (`module.exports::m`,
|
|
448
|
+
* #2966); other CommonJS export targets and prototypes are not namespaces
|
|
449
|
+
* and are left alone. Returns false (nothing extracted) for any other
|
|
450
|
+
* assignment.
|
|
429
451
|
*/
|
|
430
452
|
private extractAssignedObjectOwner;
|
|
453
|
+
/**
|
|
454
|
+
* `export default { … }` (TS/JS), read one of two ways; true when the
|
|
455
|
+
* statement's subtree is handled here:
|
|
456
|
+
* - A Vuex MODULE in a store file (the ≥2-signal heuristic), `export default
|
|
457
|
+
* { namespaced, actions: {…}, mutations: {…} }`: the methods of its
|
|
458
|
+
* actions/mutations/getters collections are extracted as nodes
|
|
459
|
+
* (extractStoreCollectionMethods). A store file's default object with
|
|
460
|
+
* neither a collection nor a function member is skipped, as before.
|
|
461
|
+
* - Any other object with function members owns them as a named literal
|
|
462
|
+
* does (#2300, #3393): a Vuex module split into files (`actions.js` is
|
|
463
|
+
* `export default { fetchUser() {…} }`), an API module. It has no name of
|
|
464
|
+
* its own, so its owner is named for the export, `default`, as
|
|
465
|
+
* `module.exports = {…}` is named for its own (#2966): the members read
|
|
466
|
+
* `default::fetchUser`. The owner is the statement, a constant (the export
|
|
467
|
+
* binding is never reassigned) and the module's default export; its
|
|
468
|
+
* members are exported with it, and the rest of the literal is walked
|
|
469
|
+
* under it, as a module-scope declaration's is (#693). A single-file
|
|
470
|
+
* component's script is not read so: what it default-exports is the
|
|
471
|
+
* component, whose options the Vue extractor names (vue-options-api).
|
|
472
|
+
* Mirrored in the kernel (tsjs/extractors.rs extract_default_export_object).
|
|
473
|
+
*/
|
|
474
|
+
private extractDefaultExportObject;
|
|
431
475
|
/**
|
|
432
476
|
* The links of an assignment target written as plain names — `dw_page` →
|
|
433
477
|
* `['dw_page']`, `window.App` → `['window', 'App']`, `App.utils.dom` →
|
|
434
|
-
* `['App', 'utils', 'dom']`
|
|
435
|
-
*
|
|
478
|
+
* `['App', 'utils', 'dom']`, `module.exports` (the module's export object,
|
|
479
|
+
* #2966) — or null for anything else: `this.x`, a computed `a[k]`, a call,
|
|
480
|
+
* another CommonJS export target (`exports.x`, `module.exports.x`), or a
|
|
436
481
|
* prototype.
|
|
437
482
|
*/
|
|
438
483
|
private objectOwnerPath;
|
|
@@ -525,7 +570,8 @@ export declare class TreeSitterExtractor {
|
|
|
525
570
|
/** Extract the methods of a store-config object's `actions`/`mutations`/`getters`
|
|
526
571
|
* properties. Used for the canonical Vuex MODULE shape `export default {
|
|
527
572
|
* namespaced, actions: {…}, mutations: {…} }` — object-literal methods aren't
|
|
528
|
-
* otherwise extracted, so the actions/mutations would never be nodes.
|
|
573
|
+
* otherwise extracted, so the actions/mutations would never be nodes. Returns
|
|
574
|
+
* whether the object has such a collection. */
|
|
529
575
|
private extractStoreCollectionMethods;
|
|
530
576
|
/** The SETUP function of a Pinia setup store (`defineStore('id', () => {…})`)
|
|
531
577
|
* — an arrow/function arg with a block body. Returns null for the options form
|
|
@@ -899,6 +945,14 @@ export declare class TreeSitterExtractor {
|
|
|
899
945
|
* heuristic — no false edges (resolution still validates each path).
|
|
900
946
|
*/
|
|
901
947
|
private extractRustRouteMacro;
|
|
948
|
+
/**
|
|
949
|
+
* The calls and variant paths in the arguments of a Rust expression macro —
|
|
950
|
+
* `format!("{}", label())`, `assert_eq!(count(), 3)`, `vec![x; size()]`,
|
|
951
|
+
* `write!(f, "{}", self.code.as_str())`, `matches!(c, Code::A | Code::B)`
|
|
952
|
+
* (#3251) — read from its token tree as the call extractor names them
|
|
953
|
+
* (rustMacroArgRefs). Mirrored by the kernel's extract_rust_macro_refs.
|
|
954
|
+
*/
|
|
955
|
+
private extractRustMacroCalls;
|
|
902
956
|
/**
|
|
903
957
|
* Record a C++ local function-pointer binding (`local = &fn` / `&fn<…>` /
|
|
904
958
|
* `&ns::fn<…>`) for the CURRENT enclosing symbol, so calls through the local
|
|
@@ -996,6 +1050,22 @@ export declare class TreeSitterExtractor {
|
|
|
996
1050
|
* `tuple_type`, …) — none of which are `type_identifier`. Closes #381.
|
|
997
1051
|
*/
|
|
998
1052
|
private extractCsharpTypeRefs;
|
|
1053
|
+
/**
|
|
1054
|
+
* A Dart 3.13 primary constructor in a class or enum header, `class
|
|
1055
|
+
* Point(final Offset origin, {Size? size})`: the types its parameters name
|
|
1056
|
+
* are the type's, as a field's declared type is, since a `final` or `var`
|
|
1057
|
+
* parameter declares one (#3270). The native kernel's
|
|
1058
|
+
* `primary_ctor_type_refs` mirrors it.
|
|
1059
|
+
*/
|
|
1060
|
+
private extractDartPrimaryCtorRefs;
|
|
1061
|
+
/**
|
|
1062
|
+
* A named Dart 3.13 primary constructor, `class Point.origin(final int x)`,
|
|
1063
|
+
* is the type's named constructor as `Point.origin(…)` in its body would
|
|
1064
|
+
* be: a method named `origin` that returns the type, which a call
|
|
1065
|
+
* `Point.origin(…)` links. An unnamed one, like `Point()`, mints no node
|
|
1066
|
+
* (#3270). The native kernel's `named_primary_ctor` mirrors it.
|
|
1067
|
+
*/
|
|
1068
|
+
private extractDartNamedPrimaryCtor;
|
|
999
1069
|
/**
|
|
1000
1070
|
* Record the dependencies declared by a C# PRIMARY CONSTRUCTOR
|
|
1001
1071
|
* (`class Svc(IRepo repo, [FromKeyedServices("k")] ICache cache) { … }`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-sitter.d.ts","sourceRoot":"","sources":["../../src/extraction/tree-sitter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,QAAQ,EAIR,gBAAgB,EAGjB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-sitter.d.ts","sourceRoot":"","sources":["../../src/extraction/tree-sitter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,QAAQ,EAIR,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAiClB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AA2xBvD,qBAAa,mBAAmB;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,oBAAoB,CAA6B;IAIzD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAoL;IAC3N,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAU;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4C;IAC7E,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAA6B;IACzD,OAAO,CAAC,cAAc,CAA6D;IACnF,OAAO,CAAC,MAAM,CAAyB;IAEvC,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,SAAS,CAAkC;IACnD,OAAO,CAAC,SAAS,CAAgB;IAMjC,OAAO,CAAC,eAAe,CAAgB;IAKvC,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,gBAAgB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
|
|
|
45
45
|
const cpp_brace_scopes_1 = require("./languages/cpp-brace-scopes");
|
|
46
46
|
const cpp_macro_methods_1 = require("./languages/cpp-macro-methods");
|
|
47
47
|
const rust_1 = require("./languages/rust");
|
|
48
|
+
const rust_macro_calls_1 = require("./languages/rust-macro-calls");
|
|
48
49
|
const go_1 = require("./languages/go");
|
|
49
50
|
const dart_1 = require("./languages/dart");
|
|
50
51
|
const cfscript_1 = require("./languages/cfscript");
|
|
@@ -58,6 +59,7 @@ const vue_extractor_1 = require("./vue-extractor");
|
|
|
58
59
|
const mybatis_extractor_1 = require("./mybatis-extractor");
|
|
59
60
|
const cfml_extractor_1 = require("./cfml-extractor");
|
|
60
61
|
const kernel_1 = require("./kernel");
|
|
62
|
+
const parse_budget_1 = require("./parse-budget");
|
|
61
63
|
const commonjs_requires_1 = require("./commonjs-requires");
|
|
62
64
|
const lazy_frameworks_1 = require("./lazy-frameworks");
|
|
63
65
|
var tree_sitter_helpers_2 = require("./tree-sitter-helpers");
|
|
@@ -284,7 +286,7 @@ const LITERAL_RECEIVER_TYPES = new Set([
|
|
|
284
286
|
'float_literal', 'int_literal', 'decimal_integer_literal', 'real_literal',
|
|
285
287
|
'char_literal', 'character_literal', 'rune_literal', 'regex', 'regex_literal',
|
|
286
288
|
'true', 'false', 'boolean_literal', 'bool_literal', 'none', 'null', 'nil',
|
|
287
|
-
'null_literal', 'undefined',
|
|
289
|
+
'nil_literal', 'null_literal', 'undefined',
|
|
288
290
|
'list', 'list_literal', 'array', 'array_literal', 'array_creation_expression',
|
|
289
291
|
'dictionary', 'dict_literal', 'object', 'tuple', 'set',
|
|
290
292
|
]);
|
|
@@ -298,10 +300,17 @@ const TS_JS_CHAIN_RECEIVER_TYPES = new Set(['member_expression', 'subscript_expr
|
|
|
298
300
|
const OBJECT_MEMBER_FUNCTION_TYPES = new Set(['arrow_function', 'function_expression', 'generator_function']);
|
|
299
301
|
const STATIC_OBJECT_KEY_TYPES = new Set(['property_identifier', 'string', 'number']);
|
|
300
302
|
const HOST_GLOBAL_ROOTS = new Set(['window', 'globalThis']);
|
|
303
|
+
const SFC_SCRIPT_HOST_FILE = /\.(?:vue|svelte|astro)$/i;
|
|
301
304
|
const THIS_FIELD_PROPERTY_TYPES = new Set(['property_identifier', 'private_property_identifier']);
|
|
302
305
|
const SWIFT_TYPE_PATH_RECEIVER = /^(?!Self\.)[A-Z]\w*(?:\.[A-Z]\w*)+$/;
|
|
306
|
+
const GO_TYPED_BUILTINS = new Set(['new', 'make', 'append']);
|
|
307
|
+
const GO_NAMED_TYPE_NODES = new Set(['type_identifier', 'qualified_type', 'generic_type']);
|
|
308
|
+
function goBuiltinNamedType(call, source) {
|
|
309
|
+
const first = (0, tree_sitter_helpers_1.getChildByField)(call, 'arguments')?.namedChild(0);
|
|
310
|
+
return first && GO_NAMED_TYPE_NODES.has(first.type) ? (0, tree_sitter_helpers_1.getNodeText)(first, source).replace(/\s+/g, '') : null;
|
|
311
|
+
}
|
|
303
312
|
function isSwiftCallWrapper(node, source) {
|
|
304
|
-
if (node.type === 'try_expression' || node.type === 'await_expression')
|
|
313
|
+
if (node.type === 'try_expression' || node.type === 'await_expression' || node.type === 'unsafe_expression')
|
|
305
314
|
return true;
|
|
306
315
|
return node.type === 'prefix_expression' && !(0, tree_sitter_helpers_1.getNodeText)(node, source).startsWith('.');
|
|
307
316
|
}
|
|
@@ -529,6 +538,8 @@ class TreeSitterExtractor {
|
|
|
529
538
|
fnRefCandidates = [];
|
|
530
539
|
vueStoreFile = null;
|
|
531
540
|
objectPathOwners = new Map();
|
|
541
|
+
scopeDeclarations = new Map();
|
|
542
|
+
exportedMemberFn = null;
|
|
532
543
|
ownsObjects = null;
|
|
533
544
|
sourceIsPreParsed = false;
|
|
534
545
|
sourceAsWritten = null;
|
|
@@ -595,9 +606,10 @@ class TreeSitterExtractor {
|
|
|
595
606
|
this.sourceAsWritten = this.source;
|
|
596
607
|
this.source = preParsed;
|
|
597
608
|
}
|
|
598
|
-
|
|
609
|
+
const budgetMs = (0, parse_budget_1.indexParseBudgetMs)(this.source.length);
|
|
610
|
+
this.tree = (0, parse_budget_1.parseWithinBudget)(parser, this.source, budgetMs);
|
|
599
611
|
if (!this.tree) {
|
|
600
|
-
throw new
|
|
612
|
+
throw new ParseTimeoutError(budgetMs);
|
|
601
613
|
}
|
|
602
614
|
if (this.language === 'cpp' && this.tree.rootNode.hasError) {
|
|
603
615
|
this.cppBraceScopes = (0, cpp_brace_scopes_1.scanCppBraceScopes)(this.source);
|
|
@@ -652,7 +664,7 @@ class TreeSitterExtractor {
|
|
|
652
664
|
throw error;
|
|
653
665
|
}
|
|
654
666
|
this.errors.push({
|
|
655
|
-
message: `Parse error: ${msg}`,
|
|
667
|
+
message: error instanceof ParseTimeoutError ? msg : `Parse error: ${msg}`,
|
|
656
668
|
filePath: this.filePath,
|
|
657
669
|
severity: 'error',
|
|
658
670
|
code: 'parse_error',
|
|
@@ -1222,12 +1234,8 @@ class TreeSitterExtractor {
|
|
|
1222
1234
|
else if (nodeType === 'export_statement' &&
|
|
1223
1235
|
(this.language === 'typescript' || this.language === 'tsx' ||
|
|
1224
1236
|
this.language === 'javascript' || this.language === 'jsx') &&
|
|
1225
|
-
this.
|
|
1226
|
-
|
|
1227
|
-
if (exported && (exported.type === 'object' || exported.type === 'object_expression')) {
|
|
1228
|
-
this.extractStoreCollectionMethods(exported);
|
|
1229
|
-
skipChildren = true;
|
|
1230
|
-
}
|
|
1237
|
+
this.extractDefaultExportObject(node)) {
|
|
1238
|
+
skipChildren = true;
|
|
1231
1239
|
}
|
|
1232
1240
|
else if (this.extractor.callTypes.includes(nodeType)) {
|
|
1233
1241
|
this.extractCall(node);
|
|
@@ -1298,6 +1306,9 @@ class TreeSitterExtractor {
|
|
|
1298
1306
|
target: id,
|
|
1299
1307
|
kind: 'contains',
|
|
1300
1308
|
});
|
|
1309
|
+
if ((kind === 'function' || kind === 'class') && TS_JS_CHAIN_LANGUAGES.has(this.language)) {
|
|
1310
|
+
this.scopeDeclarations.set(`${parentId}\0${name}`, newNode);
|
|
1311
|
+
}
|
|
1301
1312
|
}
|
|
1302
1313
|
}
|
|
1303
1314
|
if (this.valueRefsEnabled)
|
|
@@ -1413,6 +1424,15 @@ class TreeSitterExtractor {
|
|
|
1413
1424
|
this.extractMethod(node);
|
|
1414
1425
|
return;
|
|
1415
1426
|
}
|
|
1427
|
+
if (!nameOverride &&
|
|
1428
|
+
(node.type === 'function_expression' || node.type === 'arrow_function' || node.type === 'generator_function') &&
|
|
1429
|
+
node.parent?.type === 'assignment_expression') {
|
|
1430
|
+
const member = this.constructorMember(node.parent, node);
|
|
1431
|
+
if (member) {
|
|
1432
|
+
this.extractConstructorMember(node, node.parent, member);
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1416
1436
|
let name = nameOverride ?? extractName(node, this.source, this.extractor);
|
|
1417
1437
|
let commonJsExport = false;
|
|
1418
1438
|
if (!nameOverride &&
|
|
@@ -1453,7 +1473,7 @@ class TreeSitterExtractor {
|
|
|
1453
1473
|
const docstring = this.docstringFor(node);
|
|
1454
1474
|
const signature = this.extractor.getSignature?.(node, this.signatureSource);
|
|
1455
1475
|
const visibility = this.extractor.getVisibility?.(node);
|
|
1456
|
-
const isExported = commonJsExport || this.extractor.isExported?.(node, this.source);
|
|
1476
|
+
const isExported = commonJsExport || this.exportedMemberFn === node.id || this.extractor.isExported?.(node, this.source);
|
|
1457
1477
|
const isAsync = this.extractor.isAsync?.(node);
|
|
1458
1478
|
const isStatic = this.extractor.isStatic?.(node);
|
|
1459
1479
|
const returnType = this.extractor.getReturnType?.(node, this.source);
|
|
@@ -1479,6 +1499,61 @@ class TreeSitterExtractor {
|
|
|
1479
1499
|
}
|
|
1480
1500
|
this.nodeStack.pop();
|
|
1481
1501
|
}
|
|
1502
|
+
constructorMember(assignment, value) {
|
|
1503
|
+
if (!this.ownsObjectLiterals())
|
|
1504
|
+
return null;
|
|
1505
|
+
const right = (0, tree_sitter_helpers_1.getChildByField)(assignment, 'right');
|
|
1506
|
+
if (!right || right.startIndex !== value.startIndex || right.endIndex !== value.endIndex)
|
|
1507
|
+
return null;
|
|
1508
|
+
const left = (0, tree_sitter_helpers_1.getChildByField)(assignment, 'left');
|
|
1509
|
+
if (left?.type !== 'member_expression')
|
|
1510
|
+
return null;
|
|
1511
|
+
const property = (0, tree_sitter_helpers_1.getChildByField)(left, 'property');
|
|
1512
|
+
if (property?.type !== 'property_identifier')
|
|
1513
|
+
return null;
|
|
1514
|
+
const name = (0, tree_sitter_helpers_1.getNodeText)(property, this.source);
|
|
1515
|
+
if (name === 'prototype')
|
|
1516
|
+
return null;
|
|
1517
|
+
let object = (0, tree_sitter_helpers_1.getChildByField)(left, 'object');
|
|
1518
|
+
let isStatic = true;
|
|
1519
|
+
if (object?.type === 'member_expression') {
|
|
1520
|
+
const link = (0, tree_sitter_helpers_1.getChildByField)(object, 'property');
|
|
1521
|
+
if (link?.type !== 'property_identifier' || (0, tree_sitter_helpers_1.getNodeText)(link, this.source) !== 'prototype')
|
|
1522
|
+
return null;
|
|
1523
|
+
object = (0, tree_sitter_helpers_1.getChildByField)(object, 'object');
|
|
1524
|
+
isStatic = false;
|
|
1525
|
+
}
|
|
1526
|
+
if (object?.type !== 'identifier')
|
|
1527
|
+
return null;
|
|
1528
|
+
const scopeId = this.nodeStack[this.nodeStack.length - 1];
|
|
1529
|
+
const owner = scopeId ? this.scopeDeclarations.get(`${scopeId}\0${(0, tree_sitter_helpers_1.getNodeText)(object, this.source)}`) : undefined;
|
|
1530
|
+
return owner ? { owner, name, isStatic } : null;
|
|
1531
|
+
}
|
|
1532
|
+
extractConstructorMember(node, assignment, member) {
|
|
1533
|
+
const statement = assignment.parent?.type === 'expression_statement' ? assignment.parent : assignment;
|
|
1534
|
+
const saved = this.nodeStack;
|
|
1535
|
+
this.nodeStack = [...saved, member.owner.id];
|
|
1536
|
+
const method = this.createNode('method', member.name, node, {
|
|
1537
|
+
docstring: this.docstringFor(statement),
|
|
1538
|
+
signature: this.extractor.getSignature?.(node, this.signatureSource),
|
|
1539
|
+
visibility: this.extractor.getVisibility?.(node),
|
|
1540
|
+
isAsync: this.extractor.isAsync?.(node),
|
|
1541
|
+
isStatic: member.isStatic,
|
|
1542
|
+
returnType: this.extractor.getReturnType?.(node, this.source),
|
|
1543
|
+
});
|
|
1544
|
+
if (method) {
|
|
1545
|
+
this.extractTypeAnnotations(node, method.id);
|
|
1546
|
+
this.extractDecoratorsFor(node, method.id);
|
|
1547
|
+
this.nodeStack.push(method.id);
|
|
1548
|
+
const body = this.extractor.resolveBody?.(node, this.extractor.bodyField)
|
|
1549
|
+
?? (0, tree_sitter_helpers_1.getChildByField)(node, this.extractor.bodyField);
|
|
1550
|
+
this.visitParameterDefaults(node, body);
|
|
1551
|
+
if (body)
|
|
1552
|
+
this.visitFunctionBody(body, method.id);
|
|
1553
|
+
this.nodeStack.pop();
|
|
1554
|
+
}
|
|
1555
|
+
this.nodeStack = saved;
|
|
1556
|
+
}
|
|
1482
1557
|
visitParameterDefaults(fn, body) {
|
|
1483
1558
|
if (!body || !TS_JS_CHAIN_LANGUAGES.has(this.language))
|
|
1484
1559
|
return;
|
|
@@ -1717,8 +1792,10 @@ class TreeSitterExtractor {
|
|
|
1717
1792
|
this.extractInheritance(node, classNode.id);
|
|
1718
1793
|
this.extractCMemberTypeRefs(node, classNode);
|
|
1719
1794
|
this.extractCsharpPrimaryCtorParamRefs(node, classNode.id);
|
|
1795
|
+
this.extractDartPrimaryCtorRefs(node, classNode.id);
|
|
1720
1796
|
this.extractDecoratorsFor(node, classNode.id);
|
|
1721
1797
|
this.nodeStack.push(classNode.id);
|
|
1798
|
+
this.extractDartNamedPrimaryCtor(node, classNode.name);
|
|
1722
1799
|
const body = resolvedBody ?? node;
|
|
1723
1800
|
for (let i = 0; i < body.namedChildCount; i++) {
|
|
1724
1801
|
const child = body.namedChild(i);
|
|
@@ -1912,7 +1989,9 @@ class TreeSitterExtractor {
|
|
|
1912
1989
|
if (!enumNode)
|
|
1913
1990
|
return;
|
|
1914
1991
|
this.extractInheritance(node, enumNode.id);
|
|
1992
|
+
this.extractDartPrimaryCtorRefs(node, enumNode.id);
|
|
1915
1993
|
this.nodeStack.push(enumNode.id);
|
|
1994
|
+
this.extractDartNamedPrimaryCtor(node, enumNode.name);
|
|
1916
1995
|
const memberTypes = this.extractor.enumMemberTypes;
|
|
1917
1996
|
for (let i = 0; i < body.namedChildCount; i++) {
|
|
1918
1997
|
const child = body.namedChild(i);
|
|
@@ -2146,7 +2225,7 @@ class TreeSitterExtractor {
|
|
|
2146
2225
|
}
|
|
2147
2226
|
return null;
|
|
2148
2227
|
}
|
|
2149
|
-
extractOwnedObjectMembers(obj, ownerId, valuesUnderOwner, global) {
|
|
2228
|
+
extractOwnedObjectMembers(obj, ownerId, valuesUnderOwner, global, exported = false) {
|
|
2150
2229
|
const enclosing = this.nodeStack;
|
|
2151
2230
|
const ownerStack = [...(global ? enclosing.slice(0, 1) : enclosing), ownerId];
|
|
2152
2231
|
const valueStack = valuesUnderOwner ? ownerStack : enclosing;
|
|
@@ -2158,10 +2237,14 @@ class TreeSitterExtractor {
|
|
|
2158
2237
|
continue;
|
|
2159
2238
|
const owned = this.ownedMemberFunction(member);
|
|
2160
2239
|
this.nodeStack = owned ? ownerStack : valueStack;
|
|
2161
|
-
if (owned)
|
|
2240
|
+
if (owned) {
|
|
2241
|
+
this.exportedMemberFn = exported ? owned.fn.id : null;
|
|
2162
2242
|
this.extractFunction(owned.fn, owned.name);
|
|
2163
|
-
|
|
2243
|
+
this.exportedMemberFn = null;
|
|
2244
|
+
}
|
|
2245
|
+
else {
|
|
2164
2246
|
this.visitFunctionBody(member, '');
|
|
2247
|
+
}
|
|
2165
2248
|
}
|
|
2166
2249
|
this.nodeStack = enclosing;
|
|
2167
2250
|
}
|
|
@@ -2211,7 +2294,27 @@ class TreeSitterExtractor {
|
|
|
2211
2294
|
return false;
|
|
2212
2295
|
if (qualifiedName !== undefined)
|
|
2213
2296
|
this.objectPathOwners.set(owner.id, qualifiedName);
|
|
2214
|
-
this.extractOwnedObjectMembers(obj, owner.id, false, global);
|
|
2297
|
+
this.extractOwnedObjectMembers(obj, owner.id, false, global, qualifiedName === 'module.exports');
|
|
2298
|
+
return true;
|
|
2299
|
+
}
|
|
2300
|
+
extractDefaultExportObject(statement) {
|
|
2301
|
+
const value = (0, tree_sitter_helpers_1.getChildByField)(statement, 'value');
|
|
2302
|
+
if (value?.type !== 'object' && value?.type !== 'object_expression')
|
|
2303
|
+
return false;
|
|
2304
|
+
if (this.looksLikeVueStoreFile() && this.extractStoreCollectionMethods(value))
|
|
2305
|
+
return true;
|
|
2306
|
+
const obj = SFC_SCRIPT_HOST_FILE.test(this.filePath) ? null : this.ownedObjectValue(value);
|
|
2307
|
+
if (!obj)
|
|
2308
|
+
return this.looksLikeVueStoreFile();
|
|
2309
|
+
const initValue = (0, tree_sitter_helpers_1.getNodeText)(obj, this.source).slice(0, 100);
|
|
2310
|
+
const owner = this.createNode('constant', 'default', statement, {
|
|
2311
|
+
docstring: this.docstringFor(statement),
|
|
2312
|
+
signature: `= ${initValue}${initValue.length >= 100 ? '...' : ''}`,
|
|
2313
|
+
isExported: true,
|
|
2314
|
+
});
|
|
2315
|
+
if (!owner)
|
|
2316
|
+
return this.looksLikeVueStoreFile();
|
|
2317
|
+
this.extractOwnedObjectMembers(obj, owner.id, true, false);
|
|
2215
2318
|
return true;
|
|
2216
2319
|
}
|
|
2217
2320
|
objectOwnerPath(left) {
|
|
@@ -2227,7 +2330,8 @@ class TreeSitterExtractor {
|
|
|
2227
2330
|
if (cur?.type !== 'identifier')
|
|
2228
2331
|
return null;
|
|
2229
2332
|
const root = (0, tree_sitter_helpers_1.getNodeText)(cur, this.source);
|
|
2230
|
-
|
|
2333
|
+
const exportObject = root === 'module' && path.length === 1 && path[0] === 'exports';
|
|
2334
|
+
if (!exportObject && (root === 'module' || root === 'exports' || path.includes('prototype')))
|
|
2231
2335
|
return null;
|
|
2232
2336
|
path.unshift(root);
|
|
2233
2337
|
return path;
|
|
@@ -2517,6 +2621,7 @@ class TreeSitterExtractor {
|
|
|
2517
2621
|
return objects;
|
|
2518
2622
|
}
|
|
2519
2623
|
extractStoreCollectionMethods(configObj) {
|
|
2624
|
+
let found = false;
|
|
2520
2625
|
for (let j = 0; j < configObj.namedChildCount; j++) {
|
|
2521
2626
|
const member = configObj.namedChild(j);
|
|
2522
2627
|
if (member?.type !== 'pair')
|
|
@@ -2527,8 +2632,10 @@ class TreeSitterExtractor {
|
|
|
2527
2632
|
const value = (0, tree_sitter_helpers_1.getChildByField)(member, 'value');
|
|
2528
2633
|
if (value && (value.type === 'object' || value.type === 'object_expression')) {
|
|
2529
2634
|
this.extractObjectLiteralFunctions(value);
|
|
2635
|
+
found = true;
|
|
2530
2636
|
}
|
|
2531
2637
|
}
|
|
2638
|
+
return found;
|
|
2532
2639
|
}
|
|
2533
2640
|
findPiniaSetupFn(callNode) {
|
|
2534
2641
|
const callee = (0, tree_sitter_helpers_1.getChildByField)(callNode, 'function');
|
|
@@ -4170,6 +4277,15 @@ class TreeSitterExtractor {
|
|
|
4170
4277
|
else if (this.language === 'rust' && receiver && (rustChain = rustReceiverChain(receiver, this.source)) !== null) {
|
|
4171
4278
|
calleeName = `${rustChain}.${methodName}`;
|
|
4172
4279
|
}
|
|
4280
|
+
else if (this.language === 'go' &&
|
|
4281
|
+
receiver &&
|
|
4282
|
+
receiver.type === 'call_expression' &&
|
|
4283
|
+
(0, tree_sitter_helpers_1.getChildByField)(receiver, 'function')?.type === 'identifier' &&
|
|
4284
|
+
GO_TYPED_BUILTINS.has((0, tree_sitter_helpers_1.getNodeText)((0, tree_sitter_helpers_1.getChildByField)(receiver, 'function'), this.source))) {
|
|
4285
|
+
const builtin = (0, tree_sitter_helpers_1.getNodeText)((0, tree_sitter_helpers_1.getChildByField)(receiver, 'function'), this.source);
|
|
4286
|
+
const written = builtin === 'append' ? null : goBuiltinNamedType(receiver, this.source);
|
|
4287
|
+
calleeName = written ? `${builtin}(${written}).${methodName}` : methodName;
|
|
4288
|
+
}
|
|
4173
4289
|
else if ((this.language === 'cpp' ||
|
|
4174
4290
|
this.language === 'c' ||
|
|
4175
4291
|
this.language === 'kotlin' ||
|
|
@@ -4327,6 +4443,8 @@ class TreeSitterExtractor {
|
|
|
4327
4443
|
}
|
|
4328
4444
|
}
|
|
4329
4445
|
}
|
|
4446
|
+
if (calleeName && this.language === 'csharp')
|
|
4447
|
+
calleeName = calleeName.replace(/[?!]\./g, '.');
|
|
4330
4448
|
if (calleeName) {
|
|
4331
4449
|
const conv = calleeName.match(/^\(\s*\*?\s*([A-Za-z_][\w.]*)\s*\)$/);
|
|
4332
4450
|
if (conv && conv[1])
|
|
@@ -4526,13 +4644,19 @@ class TreeSitterExtractor {
|
|
|
4526
4644
|
return;
|
|
4527
4645
|
if (node.namedChildren.some((c) => c.type === 'argument_part'))
|
|
4528
4646
|
return;
|
|
4647
|
+
if (knownParent?.type === 'relational_expression' && (0, dart_1.dartMisparsedCtorIn)(knownParent, node))
|
|
4648
|
+
return;
|
|
4529
4649
|
const prev = (0, dart_1.dartReceiverOf)(node);
|
|
4530
4650
|
if (prev?.type === 'identifier' && /^[A-Z][A-Za-z0-9_]*$/.test(prev.text)) {
|
|
4531
4651
|
const before = knownParent?.type === 'relational_expression' ? prev.previousNamedSibling : null;
|
|
4532
4652
|
if (before?.type === 'relational_operator' && (0, dart_1.dartMisparsedGenericCall)(before))
|
|
4533
4653
|
return;
|
|
4534
4654
|
this.pushStaticMemberRef(prev.text, ownerId, prev);
|
|
4655
|
+
return;
|
|
4535
4656
|
}
|
|
4657
|
+
const type = (0, dart_1.dartTypeArgumentsType)(node);
|
|
4658
|
+
if (type && (0, dart_1.isDartTypeName)(type))
|
|
4659
|
+
this.pushStaticMemberRef(type.text, ownerId, type);
|
|
4536
4660
|
return;
|
|
4537
4661
|
}
|
|
4538
4662
|
if (this.language === 'rust') {
|
|
@@ -4960,6 +5084,22 @@ class TreeSitterExtractor {
|
|
|
4960
5084
|
}
|
|
4961
5085
|
flush();
|
|
4962
5086
|
}
|
|
5087
|
+
extractRustMacroCalls(node) {
|
|
5088
|
+
if (this.language !== 'rust')
|
|
5089
|
+
return;
|
|
5090
|
+
const fromId = this.nodeStack[this.nodeStack.length - 1];
|
|
5091
|
+
if (!fromId)
|
|
5092
|
+
return;
|
|
5093
|
+
for (const r of (0, rust_macro_calls_1.rustMacroArgRefs)(node, this.source)) {
|
|
5094
|
+
this.unresolvedReferences.push({
|
|
5095
|
+
fromNodeId: fromId,
|
|
5096
|
+
referenceName: r.name,
|
|
5097
|
+
referenceKind: r.kind,
|
|
5098
|
+
line: r.at.startPosition.row + 1,
|
|
5099
|
+
column: r.at.startPosition.column,
|
|
5100
|
+
});
|
|
5101
|
+
}
|
|
5102
|
+
}
|
|
4963
5103
|
recordCppFnPtrBinding(localName, value) {
|
|
4964
5104
|
if (!value || value.type !== 'pointer_expression')
|
|
4965
5105
|
return;
|
|
@@ -5113,10 +5253,15 @@ class TreeSitterExtractor {
|
|
|
5113
5253
|
return;
|
|
5114
5254
|
if (nodeType === 'assignment_expression' && this.extractAssignedObjectOwner(node, false))
|
|
5115
5255
|
return;
|
|
5116
|
-
if (nodeType === 'macro_invocation')
|
|
5256
|
+
if (nodeType === 'macro_invocation') {
|
|
5117
5257
|
this.extractRustRouteMacro(node);
|
|
5258
|
+
this.extractRustMacroCalls(node);
|
|
5259
|
+
}
|
|
5118
5260
|
if (nodeType === 'include_statement' && this.language === 'cfscript')
|
|
5119
5261
|
this.extractImport(node);
|
|
5262
|
+
if (this.language === 'php' && nodeType !== 'namespace_use_declaration' && this.extractor.importTypes.includes(nodeType)) {
|
|
5263
|
+
this.extractImport(node);
|
|
5264
|
+
}
|
|
5120
5265
|
if (this.extractor.callTypes.includes(nodeType)) {
|
|
5121
5266
|
this.extractCall(node);
|
|
5122
5267
|
}
|
|
@@ -5215,6 +5360,27 @@ class TreeSitterExtractor {
|
|
|
5215
5360
|
column: typeNode.startPosition.column,
|
|
5216
5361
|
});
|
|
5217
5362
|
}
|
|
5363
|
+
const ctor = nodeType === 'relational_expression' && ownerId ? (0, dart_1.dartMisparsedCtor)(node) : undefined;
|
|
5364
|
+
if (ctor && ownerId) {
|
|
5365
|
+
this.unresolvedReferences.push({
|
|
5366
|
+
fromNodeId: ownerId,
|
|
5367
|
+
referenceName: `${ctor.type.text}.${ctor.name.text}`,
|
|
5368
|
+
referenceKind: 'calls',
|
|
5369
|
+
line: ctor.head.startPosition.row + 1,
|
|
5370
|
+
column: ctor.head.startPosition.column,
|
|
5371
|
+
});
|
|
5372
|
+
for (const type of [ctor.type, ...ctor.typeArgs]) {
|
|
5373
|
+
if (!(0, dart_1.isDartTypeName)(type))
|
|
5374
|
+
continue;
|
|
5375
|
+
this.unresolvedReferences.push({
|
|
5376
|
+
fromNodeId: ownerId,
|
|
5377
|
+
referenceName: type.text,
|
|
5378
|
+
referenceKind: 'references',
|
|
5379
|
+
line: type.startPosition.row + 1,
|
|
5380
|
+
column: type.startPosition.column,
|
|
5381
|
+
});
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5218
5384
|
}
|
|
5219
5385
|
if (nodeType === 'variable_declarator' &&
|
|
5220
5386
|
this.TYPE_ANNOTATION_LANGUAGES.has(this.language)) {
|
|
@@ -5246,6 +5412,10 @@ class TreeSitterExtractor {
|
|
|
5246
5412
|
this.extractFunction(node);
|
|
5247
5413
|
return;
|
|
5248
5414
|
}
|
|
5415
|
+
if (parent?.type === 'assignment_expression' && this.constructorMember(parent, node)) {
|
|
5416
|
+
this.extractFunction(node);
|
|
5417
|
+
return;
|
|
5418
|
+
}
|
|
5249
5419
|
}
|
|
5250
5420
|
if (this.isClassTypeNode(node, nodeType)) {
|
|
5251
5421
|
const classification = this.extractor.classifyClassNode?.(node) ?? 'class';
|
|
@@ -5763,6 +5933,31 @@ class TreeSitterExtractor {
|
|
|
5763
5933
|
}
|
|
5764
5934
|
}
|
|
5765
5935
|
}
|
|
5936
|
+
extractDartPrimaryCtorRefs(node, ownerId) {
|
|
5937
|
+
if (this.language !== 'dart')
|
|
5938
|
+
return;
|
|
5939
|
+
const ctor = (0, tree_sitter_helpers_1.getChildByField)(node, 'primary_constructor');
|
|
5940
|
+
const parameters = ctor ? (0, tree_sitter_helpers_1.getChildByField)(ctor, 'parameters') : null;
|
|
5941
|
+
if (parameters)
|
|
5942
|
+
(0, dart_1.pushDartTypeRefs)(parameters, ownerId, (ref) => this.unresolvedReferences.push(ref));
|
|
5943
|
+
}
|
|
5944
|
+
extractDartNamedPrimaryCtor(node, typeName) {
|
|
5945
|
+
if (this.language !== 'dart')
|
|
5946
|
+
return;
|
|
5947
|
+
const ctor = (0, tree_sitter_helpers_1.getChildByField)(node, 'primary_constructor');
|
|
5948
|
+
const name = ctor ? (0, tree_sitter_helpers_1.getChildByField)(ctor, 'name') : null;
|
|
5949
|
+
if (!ctor || name?.type !== 'identifier')
|
|
5950
|
+
return;
|
|
5951
|
+
const parameters = (0, tree_sitter_helpers_1.getChildByField)(ctor, 'parameters');
|
|
5952
|
+
const signature = parameters ? (0, tree_sitter_helpers_1.getNodeText)(parameters, this.source).trim() : '';
|
|
5953
|
+
this.createNode('method', (0, tree_sitter_helpers_1.getNodeText)(name, this.source), ctor, {
|
|
5954
|
+
signature: signature || undefined,
|
|
5955
|
+
visibility: 'public',
|
|
5956
|
+
isAsync: false,
|
|
5957
|
+
isStatic: false,
|
|
5958
|
+
returnType: typeName,
|
|
5959
|
+
});
|
|
5960
|
+
}
|
|
5766
5961
|
extractCsharpPrimaryCtorParamRefs(node, ownerId) {
|
|
5767
5962
|
if (this.language !== 'csharp')
|
|
5768
5963
|
return;
|
|
@@ -6845,6 +7040,11 @@ class TreeSitterExtractor {
|
|
|
6845
7040
|
}
|
|
6846
7041
|
}
|
|
6847
7042
|
exports.TreeSitterExtractor = TreeSitterExtractor;
|
|
7043
|
+
class ParseTimeoutError extends Error {
|
|
7044
|
+
constructor(budgetMs) {
|
|
7045
|
+
super((0, parse_budget_1.parseTimeoutMessage)(budgetMs));
|
|
7046
|
+
}
|
|
7047
|
+
}
|
|
6848
7048
|
function extractFromSource(filePath, source, language, frameworkNames) {
|
|
6849
7049
|
const detectedLanguage = language || (0, grammars_1.detectLanguage)(filePath, source);
|
|
6850
7050
|
const fileExtension = path.extname(filePath).toLowerCase();
|