gitnexus 1.6.6-rc.98 → 1.6.6
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/README.md +122 -68
- package/dist/_shared/graph/types.d.ts +17 -1
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +3 -5
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js +2 -4
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.d.ts +1 -2
- package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.js +1 -2
- package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +24 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +13 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/context.d.ts +1 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/context.js +6 -0
- package/dist/_shared/scope-resolution/registries/context.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/evidence.d.ts +2 -3
- package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/evidence.js +2 -3
- package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/macro-registry.d.ts +29 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.js +32 -0
- package/dist/_shared/scope-resolution/registries/macro-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +9 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +1 -1
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +35 -1
- package/dist/cli/ai-context.js +111 -12
- package/dist/cli/analyze-config.d.ts +92 -0
- package/dist/cli/analyze-config.js +364 -0
- package/dist/cli/analyze.d.ts +17 -1
- package/dist/cli/analyze.js +224 -71
- package/dist/cli/cli-message.d.ts +1 -1
- package/dist/cli/doctor.d.ts +18 -0
- package/dist/cli/doctor.js +32 -0
- package/dist/cli/i18n/en.d.ts +2 -2
- package/dist/cli/i18n/en.js +2 -2
- package/dist/cli/i18n/resources.d.ts +2 -2
- package/dist/cli/i18n/zh-CN.js +2 -2
- package/dist/cli/index.js +4 -2
- package/dist/cli/resolve-invocation.d.ts +21 -0
- package/dist/cli/resolve-invocation.js +68 -0
- package/dist/cli/setup.d.ts +33 -0
- package/dist/cli/setup.js +96 -35
- package/dist/cli/skill-gen.js +2 -2
- package/dist/cli/wiki.js +20 -4
- package/dist/core/embeddings/embedder.d.ts +1 -1
- package/dist/core/embeddings/embedder.js +14 -1
- package/dist/core/embeddings/runtime-support.d.ts +41 -0
- package/dist/core/embeddings/runtime-support.js +65 -0
- package/dist/core/group/extractors/grpc-patterns/proto.js +2 -1
- package/dist/core/group/extractors/http-patterns/java.js +15 -1
- package/dist/core/ingestion/call-processor.d.ts +57 -227
- package/dist/core/ingestion/call-processor.js +172 -2595
- package/dist/core/ingestion/call-routing.d.ts +6 -5
- package/dist/core/ingestion/call-routing.js +6 -6
- package/dist/core/ingestion/call-types.d.ts +0 -75
- package/dist/core/ingestion/class-extractors/configs/c-cpp.js +26 -1
- package/dist/core/ingestion/class-extractors/configs/ruby.js +3 -0
- package/dist/core/ingestion/class-extractors/generic.js +9 -11
- package/dist/core/ingestion/class-types.d.ts +23 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +11 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +227 -73
- package/dist/core/ingestion/cobol-processor.d.ts +1 -0
- package/dist/core/ingestion/cobol-processor.js +51 -2
- package/dist/core/ingestion/emit-references.js +8 -2
- package/dist/core/ingestion/export-detection.d.ts +2 -1
- package/dist/core/ingestion/export-detection.js +2 -6
- package/dist/core/ingestion/field-extractors/configs/dart.d.ts +0 -6
- package/dist/core/ingestion/field-extractors/configs/dart.js +62 -44
- package/dist/core/ingestion/field-extractors/configs/go.d.ts +0 -9
- package/dist/core/ingestion/field-extractors/configs/go.js +40 -1
- package/dist/core/ingestion/field-extractors/configs/jvm.js +43 -4
- package/dist/core/ingestion/field-extractors/configs/php.js +1 -2
- package/dist/core/ingestion/field-extractors/configs/swift.d.ts +12 -1
- package/dist/core/ingestion/field-extractors/configs/swift.js +31 -6
- package/dist/core/ingestion/field-extractors/generic.d.ts +6 -0
- package/dist/core/ingestion/field-extractors/generic.js +5 -4
- package/dist/core/ingestion/field-extractors/typescript.js +0 -29
- package/dist/core/ingestion/filesystem-walker.d.ts +0 -9
- package/dist/core/ingestion/filesystem-walker.js +0 -11
- package/dist/core/ingestion/finalize-orchestrator.js +14 -2
- package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +21 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.js +72 -11
- package/dist/core/ingestion/import-resolvers/python.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/standard.d.ts +2 -2
- package/dist/core/ingestion/import-resolvers/standard.js +6 -5
- package/dist/core/ingestion/import-resolvers/utils.d.ts +2 -5
- package/dist/core/ingestion/import-resolvers/utils.js +1 -9
- package/dist/core/ingestion/language-provider.d.ts +39 -119
- package/dist/core/ingestion/language-provider.js +0 -2
- package/dist/core/ingestion/languages/c/capture-side-channel.d.ts +62 -0
- package/dist/core/ingestion/languages/c/capture-side-channel.js +65 -0
- package/dist/core/ingestion/languages/c/captures.js +41 -23
- package/dist/core/ingestion/languages/c/import-decomposer.d.ts +9 -0
- package/dist/core/ingestion/languages/c/import-decomposer.js +15 -0
- package/dist/core/ingestion/languages/c/import-target.js +52 -9
- package/dist/core/ingestion/languages/c/index.d.ts +2 -1
- package/dist/core/ingestion/languages/c/index.js +2 -1
- package/dist/core/ingestion/languages/c/query.js +15 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +47 -4
- package/dist/core/ingestion/languages/c/static-linkage.d.ts +8 -0
- package/dist/core/ingestion/languages/c/static-linkage.js +46 -1
- package/dist/core/ingestion/languages/c-cpp.js +16 -7
- package/dist/core/ingestion/languages/cobol/captures.js +25 -2
- package/dist/core/ingestion/languages/cpp/adl.d.ts +88 -4
- package/dist/core/ingestion/languages/cpp/adl.js +380 -160
- package/dist/core/ingestion/languages/cpp/arity-metadata.js +2 -8
- package/dist/core/ingestion/languages/cpp/capture-side-channel.d.ts +65 -0
- package/dist/core/ingestion/languages/cpp/capture-side-channel.js +78 -0
- package/dist/core/ingestion/languages/cpp/captures.js +162 -54
- package/dist/core/ingestion/languages/cpp/file-local-linkage.d.ts +18 -52
- package/dist/core/ingestion/languages/cpp/file-local-linkage.js +49 -1
- package/dist/core/ingestion/languages/cpp/import-decomposer.d.ts +7 -0
- package/dist/core/ingestion/languages/cpp/import-decomposer.js +12 -0
- package/dist/core/ingestion/languages/cpp/index.d.ts +1 -0
- package/dist/core/ingestion/languages/cpp/index.js +1 -0
- package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +8 -0
- package/dist/core/ingestion/languages/cpp/inline-namespaces.js +21 -0
- package/dist/core/ingestion/languages/cpp/query.js +21 -0
- package/dist/core/ingestion/languages/cpp/range-bindings.js +20 -5
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +52 -5
- package/dist/core/ingestion/languages/cpp/two-phase-lookup.d.ts +20 -0
- package/dist/core/ingestion/languages/cpp/two-phase-lookup.js +83 -3
- package/dist/core/ingestion/languages/csharp/captures.js +205 -41
- package/dist/core/ingestion/languages/csharp/index.d.ts +3 -4
- package/dist/core/ingestion/languages/csharp/index.js +3 -4
- package/dist/core/ingestion/languages/csharp/interpret.js +17 -3
- package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +17 -7
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +129 -124
- package/dist/core/ingestion/languages/csharp/qualified-type-names.d.ts +14 -0
- package/dist/core/ingestion/languages/csharp/qualified-type-names.js +59 -0
- package/dist/core/ingestion/languages/csharp/query.js +13 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.js +10 -6
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -1
- package/dist/core/ingestion/languages/csharp.js +0 -5
- package/dist/core/ingestion/languages/dart/arity-metadata.d.ts +25 -0
- package/dist/core/ingestion/languages/dart/arity-metadata.js +35 -0
- package/dist/core/ingestion/languages/dart/arity.d.ts +19 -0
- package/dist/core/ingestion/languages/dart/arity.js +31 -0
- package/dist/core/ingestion/languages/dart/built-ins.d.ts +11 -0
- package/dist/core/ingestion/languages/dart/built-ins.js +34 -0
- package/dist/core/ingestion/languages/dart/cache-stats.d.ts +13 -0
- package/dist/core/ingestion/languages/dart/cache-stats.js +24 -0
- package/dist/core/ingestion/languages/dart/captures.d.ts +29 -0
- package/dist/core/ingestion/languages/dart/captures.js +445 -0
- package/dist/core/ingestion/languages/dart/expand-wildcards.d.ts +13 -0
- package/dist/core/ingestion/languages/dart/expand-wildcards.js +31 -0
- package/dist/core/ingestion/languages/dart/import-target.d.ts +15 -0
- package/dist/core/ingestion/languages/dart/import-target.js +65 -0
- package/dist/core/ingestion/languages/dart/index.d.ts +28 -0
- package/dist/core/ingestion/languages/dart/index.js +28 -0
- package/dist/core/ingestion/languages/dart/interpret.d.ts +24 -0
- package/dist/core/ingestion/languages/dart/interpret.js +95 -0
- package/dist/core/ingestion/languages/dart/merge-bindings.d.ts +10 -0
- package/dist/core/ingestion/languages/dart/merge-bindings.js +39 -0
- package/dist/core/ingestion/languages/dart/query.d.ts +26 -0
- package/dist/core/ingestion/languages/dart/query.js +142 -0
- package/dist/core/ingestion/languages/dart/receiver-binding.d.ts +24 -0
- package/dist/core/ingestion/languages/dart/receiver-binding.js +87 -0
- package/dist/core/ingestion/languages/dart/scope-resolver.d.ts +29 -0
- package/dist/core/ingestion/languages/dart/scope-resolver.js +194 -0
- package/dist/core/ingestion/languages/dart/signature-bindings.d.ts +23 -0
- package/dist/core/ingestion/languages/dart/signature-bindings.js +51 -0
- package/dist/core/ingestion/languages/dart/simple-hooks.d.ts +20 -0
- package/dist/core/ingestion/languages/dart/simple-hooks.js +47 -0
- package/dist/core/ingestion/languages/dart.d.ts +0 -1
- package/dist/core/ingestion/languages/dart.js +15 -29
- package/dist/core/ingestion/languages/go/arity-metadata.d.ts +1 -0
- package/dist/core/ingestion/languages/go/arity-metadata.js +31 -1
- package/dist/core/ingestion/languages/go/captures.js +247 -26
- package/dist/core/ingestion/languages/go/interface-impls.js +476 -50
- package/dist/core/ingestion/languages/go/interpret.js +21 -11
- package/dist/core/ingestion/languages/go/method-owners.js +20 -8
- package/dist/core/ingestion/languages/go/query.js +15 -7
- package/dist/core/ingestion/languages/go/range-binding.js +24 -9
- package/dist/core/ingestion/languages/go/receiver-binding.js +1 -1
- package/dist/core/ingestion/languages/go/scope-resolver.js +2 -2
- package/dist/core/ingestion/languages/go/simple-hooks.js +10 -5
- package/dist/core/ingestion/languages/go/type-binding.d.ts +1 -0
- package/dist/core/ingestion/languages/go/type-binding.js +40 -2
- package/dist/core/ingestion/languages/go.d.ts +0 -1
- package/dist/core/ingestion/languages/go.js +0 -5
- package/dist/core/ingestion/languages/index.d.ts +0 -5
- package/dist/core/ingestion/languages/index.js +0 -3
- package/dist/core/ingestion/languages/java/captures.js +252 -23
- package/dist/core/ingestion/languages/java/interpret.js +12 -6
- package/dist/core/ingestion/languages/java/package-siblings.js +18 -5
- package/dist/core/ingestion/languages/java/query.js +16 -1
- package/dist/core/ingestion/languages/java/scope-resolver.d.ts +2 -8
- package/dist/core/ingestion/languages/java/scope-resolver.js +2 -8
- package/dist/core/ingestion/languages/java.js +0 -5
- package/dist/core/ingestion/languages/javascript/captures.js +185 -11
- package/dist/core/ingestion/languages/javascript/query.js +107 -1
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +57 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +60 -0
- package/dist/core/ingestion/languages/kotlin/captures.js +213 -22
- package/dist/core/ingestion/languages/kotlin/companion-scopes.d.ts +7 -0
- package/dist/core/ingestion/languages/kotlin/companion-scopes.js +10 -0
- package/dist/core/ingestion/languages/kotlin/index.d.ts +1 -0
- package/dist/core/ingestion/languages/kotlin/index.js +1 -0
- package/dist/core/ingestion/languages/kotlin/query.js +30 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.d.ts +5 -7
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +22 -7
- package/dist/core/ingestion/languages/kotlin.js +8 -5
- package/dist/core/ingestion/languages/php/captures.js +135 -19
- package/dist/core/ingestion/languages/php/import-decomposer.js +21 -63
- package/dist/core/ingestion/languages/php/index.d.ts +3 -4
- package/dist/core/ingestion/languages/php/index.js +3 -4
- package/dist/core/ingestion/languages/php/query.js +5 -0
- package/dist/core/ingestion/languages/php/receiver-binding.js +8 -4
- package/dist/core/ingestion/languages/php.js +0 -4
- package/dist/core/ingestion/languages/python/captures.js +128 -13
- package/dist/core/ingestion/languages/python/depends-references.js +1 -1
- package/dist/core/ingestion/languages/python/import-target.d.ts +4 -5
- package/dist/core/ingestion/languages/python/import-target.js +108 -16
- package/dist/core/ingestion/languages/python/index-stats.d.ts +18 -0
- package/dist/core/ingestion/languages/python/index-stats.js +25 -0
- package/dist/core/ingestion/languages/python/index.d.ts +3 -4
- package/dist/core/ingestion/languages/python/index.js +3 -4
- package/dist/core/ingestion/languages/python/query.js +17 -0
- package/dist/core/ingestion/languages/python/scope-resolver.js +7 -6
- package/dist/core/ingestion/languages/python.d.ts +0 -2
- package/dist/core/ingestion/languages/python.js +0 -7
- package/dist/core/ingestion/languages/ruby/captures.js +174 -31
- package/dist/core/ingestion/languages/ruby/import-target.js +2 -1
- package/dist/core/ingestion/languages/ruby/interpret.js +2 -1
- package/dist/core/ingestion/languages/ruby/query.js +10 -0
- package/dist/core/ingestion/languages/ruby/scope-resolver.js +61 -11
- package/dist/core/ingestion/languages/ruby.js +4 -53
- package/dist/core/ingestion/languages/rust/captures.js +95 -13
- package/dist/core/ingestion/languages/rust/query.js +64 -1
- package/dist/core/ingestion/languages/rust/range-binding.js +40 -12
- package/dist/core/ingestion/languages/rust/receiver-binding.js +9 -0
- package/dist/core/ingestion/languages/rust/scope-resolver.js +75 -1
- package/dist/core/ingestion/languages/rust.d.ts +0 -2
- package/dist/core/ingestion/languages/rust.js +0 -6
- package/dist/core/ingestion/languages/swift/arity-metadata.d.ts +24 -0
- package/dist/core/ingestion/languages/swift/arity-metadata.js +41 -0
- package/dist/core/ingestion/languages/swift/arity.d.ts +29 -0
- package/dist/core/ingestion/languages/swift/arity.js +42 -0
- package/dist/core/ingestion/languages/swift/base-type.d.ts +20 -0
- package/dist/core/ingestion/languages/swift/base-type.js +27 -0
- package/dist/core/ingestion/languages/swift/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/swift/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/swift/captures.d.ts +35 -0
- package/dist/core/ingestion/languages/swift/captures.js +495 -0
- package/dist/core/ingestion/languages/swift/implicit-imports.d.ts +34 -0
- package/dist/core/ingestion/languages/swift/implicit-imports.js +57 -0
- package/dist/core/ingestion/languages/swift/import-decomposer.d.ts +24 -0
- package/dist/core/ingestion/languages/swift/import-decomposer.js +84 -0
- package/dist/core/ingestion/languages/swift/import-target.d.ts +33 -0
- package/dist/core/ingestion/languages/swift/import-target.js +81 -0
- package/dist/core/ingestion/languages/swift/index.d.ts +37 -0
- package/dist/core/ingestion/languages/swift/index.js +37 -0
- package/dist/core/ingestion/languages/swift/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/swift/interpret.js +89 -0
- package/dist/core/ingestion/languages/swift/merge-bindings.d.ts +20 -0
- package/dist/core/ingestion/languages/swift/merge-bindings.js +48 -0
- package/dist/core/ingestion/languages/swift/query.d.ts +46 -0
- package/dist/core/ingestion/languages/swift/query.js +194 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.d.ts +40 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.js +161 -0
- package/dist/core/ingestion/languages/swift/scope-resolver.d.ts +50 -0
- package/dist/core/ingestion/languages/swift/scope-resolver.js +189 -0
- package/dist/core/ingestion/languages/swift/sibling-type-bindings.d.ts +34 -0
- package/dist/core/ingestion/languages/swift/sibling-type-bindings.js +65 -0
- package/dist/core/ingestion/languages/swift/signature-bindings.d.ts +25 -0
- package/dist/core/ingestion/languages/swift/signature-bindings.js +66 -0
- package/dist/core/ingestion/languages/swift/simple-hooks.d.ts +37 -0
- package/dist/core/ingestion/languages/swift/simple-hooks.js +60 -0
- package/dist/core/ingestion/languages/swift/target-grouping.d.ts +51 -0
- package/dist/core/ingestion/languages/swift/target-grouping.js +93 -0
- package/dist/core/ingestion/languages/swift/target-siblings.d.ts +30 -0
- package/dist/core/ingestion/languages/swift/target-siblings.js +71 -0
- package/dist/core/ingestion/languages/swift.d.ts +0 -5
- package/dist/core/ingestion/languages/swift.js +11 -87
- package/dist/core/ingestion/languages/typescript/array-callback.d.ts +3 -29
- package/dist/core/ingestion/languages/typescript/array-callback.js +4 -43
- package/dist/core/ingestion/languages/typescript/captures.js +147 -17
- package/dist/core/ingestion/languages/typescript/index.d.ts +3 -4
- package/dist/core/ingestion/languages/typescript/index.js +3 -4
- package/dist/core/ingestion/languages/typescript/query.d.ts +2 -3
- package/dist/core/ingestion/languages/typescript/query.js +125 -4
- package/dist/core/ingestion/languages/typescript/receiver-binding.js +0 -1
- package/dist/core/ingestion/languages/typescript.d.ts +2 -3
- package/dist/core/ingestion/languages/typescript.js +46 -23
- package/dist/core/ingestion/languages/vue/captures.d.ts +46 -0
- package/dist/core/ingestion/languages/vue/captures.js +67 -0
- package/dist/core/ingestion/languages/vue/import-target.d.ts +27 -0
- package/dist/core/ingestion/languages/vue/import-target.js +58 -0
- package/dist/core/ingestion/languages/vue/index.d.ts +49 -0
- package/dist/core/ingestion/languages/vue/index.js +49 -0
- package/dist/core/ingestion/languages/vue/scope-resolver.d.ts +55 -0
- package/dist/core/ingestion/languages/vue/scope-resolver.js +292 -0
- package/dist/core/ingestion/languages/vue.js +12 -4
- package/dist/core/ingestion/local-symbol-pruner.d.ts +11 -0
- package/dist/core/ingestion/local-symbol-pruner.js +63 -0
- package/dist/core/ingestion/method-extractors/configs/dart.js +14 -1
- package/dist/core/ingestion/method-extractors/configs/jvm.js +37 -20
- package/dist/core/ingestion/method-extractors/configs/php.js +0 -1
- package/dist/core/ingestion/method-extractors/configs/swift.js +11 -4
- package/dist/core/ingestion/method-types.d.ts +2 -2
- package/dist/core/ingestion/model/index.d.ts +0 -3
- package/dist/core/ingestion/model/index.js +0 -8
- package/dist/core/ingestion/model/resolve.d.ts +7 -43
- package/dist/core/ingestion/model/resolve.js +7 -226
- package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +46 -1
- package/dist/core/ingestion/model/semantic-model.d.ts +4 -6
- package/dist/core/ingestion/model/semantic-model.js +1 -1
- package/dist/core/ingestion/model/symbol-table.d.ts +3 -4
- package/dist/core/ingestion/model/symbol-table.js +3 -4
- package/dist/core/ingestion/parsing-processor.d.ts +30 -24
- package/dist/core/ingestion/parsing-processor.js +76 -640
- package/dist/core/ingestion/pipeline-phases/communities.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/communities.js +5 -2
- package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +9 -8
- package/dist/core/ingestion/pipeline-phases/cross-file.js +16 -12
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/mro.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/mro.js +2 -2
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +44 -22
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +426 -565
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +13 -33
- package/dist/core/ingestion/pipeline-phases/parse.js +2 -2
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +1 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +5 -3
- package/dist/core/ingestion/pipeline-phases/prune-local-symbols.d.ts +14 -0
- package/dist/core/ingestion/pipeline-phases/prune-local-symbols.js +26 -0
- package/dist/core/ingestion/pipeline.d.ts +27 -19
- package/dist/core/ingestion/pipeline.js +4 -2
- package/dist/core/ingestion/resolve-references.js +15 -3
- package/dist/core/ingestion/route-extractors/laravel.d.ts +10 -0
- package/dist/core/ingestion/route-extractors/laravel.js +88 -9
- package/dist/core/ingestion/scope-extractor-bridge.d.ts +2 -1
- package/dist/core/ingestion/scope-extractor-bridge.js +2 -2
- package/dist/core/ingestion/scope-extractor.js +13 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +181 -15
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +21 -10
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +10 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +7 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +58 -6
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +24 -5
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +68 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +189 -29
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +21 -1
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +1 -1
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +8 -11
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +171 -50
- package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +3 -4
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +9 -4
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +28 -5
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +191 -24
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +31 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +72 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +440 -39
- package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +18 -2
- package/dist/core/ingestion/scope-resolution/workspace-index.js +94 -7
- package/dist/core/ingestion/tree-sitter-queries.d.ts +14 -14
- package/dist/core/ingestion/tree-sitter-queries.js +380 -158
- package/dist/core/ingestion/ts-js-hoc-utils.d.ts +12 -0
- package/dist/core/ingestion/ts-js-hoc-utils.js +105 -0
- package/dist/core/ingestion/type-env.d.ts +2 -1
- package/dist/core/ingestion/type-env.js +6 -8
- package/dist/core/ingestion/type-extractors/c-cpp.js +8 -10
- package/dist/core/ingestion/type-extractors/csharp.js +18 -34
- package/dist/core/ingestion/type-extractors/go.js +2 -10
- package/dist/core/ingestion/type-extractors/jvm.js +6 -5
- package/dist/core/ingestion/type-extractors/php.js +1 -1
- package/dist/core/ingestion/type-extractors/python.js +1 -1
- package/dist/core/ingestion/type-extractors/ruby.js +2 -2
- package/dist/core/ingestion/type-extractors/rust.js +0 -16
- package/dist/core/ingestion/type-extractors/shared.d.ts +2 -2
- package/dist/core/ingestion/type-extractors/shared.js +25 -11
- package/dist/core/ingestion/type-extractors/swift.js +5 -5
- package/dist/core/ingestion/type-extractors/types.d.ts +1 -1
- package/dist/core/ingestion/type-extractors/typescript.js +1 -1
- package/dist/core/ingestion/utils/ast-helpers.d.ts +119 -1
- package/dist/core/ingestion/utils/ast-helpers.js +260 -13
- package/dist/core/ingestion/utils/callable-labels.d.ts +13 -0
- package/dist/core/ingestion/utils/callable-labels.js +14 -0
- package/dist/core/ingestion/utils/deferred-resolution-profile.d.ts +10 -0
- package/dist/core/ingestion/utils/deferred-resolution-profile.js +30 -0
- package/dist/core/ingestion/utils/heap-probe.d.ts +20 -0
- package/dist/core/ingestion/utils/heap-probe.js +39 -0
- package/dist/core/ingestion/utils/heritage-marker.d.ts +33 -0
- package/dist/core/ingestion/utils/heritage-marker.js +41 -0
- package/dist/core/ingestion/utils/qualified-name.d.ts +37 -0
- package/dist/core/ingestion/utils/qualified-name.js +67 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +49 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.js +76 -62
- package/dist/core/ingestion/variable-extractors/configs/go.js +74 -7
- package/dist/core/ingestion/variable-extractors/configs/jvm.js +35 -8
- package/dist/core/ingestion/variable-extractors/generic.js +40 -12
- package/dist/core/ingestion/variable-types.d.ts +9 -0
- package/dist/core/ingestion/vue-sfc-extractor.d.ts +97 -7
- package/dist/core/ingestion/vue-sfc-extractor.js +433 -11
- package/dist/core/ingestion/workers/parse-worker.d.ts +0 -11
- package/dist/core/ingestion/workers/parse-worker.js +358 -187
- package/dist/core/ingestion/workers/worker-pool.d.ts +78 -9
- package/dist/core/ingestion/workers/worker-pool.js +346 -49
- package/dist/core/lbug/csv-generator.js +20 -2
- package/dist/core/lbug/lbug-adapter.js +29 -10
- package/dist/core/lbug/native-check.js +17 -5
- package/dist/core/lbug/pool-adapter.d.ts +0 -19
- package/dist/core/lbug/pool-adapter.js +40 -77
- package/dist/core/lbug/query-result-utils.d.ts +19 -0
- package/dist/core/lbug/query-result-utils.js +28 -0
- package/dist/core/run-analyze.d.ts +9 -2
- package/dist/core/run-analyze.js +24 -3
- package/dist/core/tree-sitter/parser-loader.d.ts +13 -0
- package/dist/core/tree-sitter/parser-loader.js +4 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +70 -3
- package/dist/core/tree-sitter/safe-parse.js +214 -11
- package/dist/core/wiki/generator.js +13 -5
- package/dist/core/wiki/graph-queries.d.ts +3 -0
- package/dist/core/wiki/graph-queries.js +9 -1
- package/dist/core/wiki/llm-client.d.ts +1 -1
- package/dist/core/wiki/llm-client.js +7 -2
- package/dist/core/wiki/local-cli-client.d.ts +2 -1
- package/dist/core/wiki/local-cli-client.js +62 -4
- package/dist/mcp/compatible-stdio-transport.d.ts +3 -0
- package/dist/mcp/compatible-stdio-transport.js +22 -0
- package/dist/mcp/core/embedder.d.ts +1 -1
- package/dist/mcp/core/embedder.js +13 -1
- package/dist/mcp/local/local-backend.d.ts +37 -5
- package/dist/mcp/local/local-backend.js +227 -129
- package/dist/mcp/resources.js +3 -3
- package/dist/mcp/server.js +9 -1
- package/dist/storage/git.d.ts +11 -0
- package/dist/storage/git.js +30 -0
- package/dist/storage/parse-cache.d.ts +23 -1
- package/dist/storage/parse-cache.js +138 -32
- package/dist/storage/parsedfile-store.d.ts +142 -0
- package/dist/storage/parsedfile-store.js +367 -0
- package/dist/storage/repo-manager.d.ts +2 -1
- package/dist/storage/scope-index-store.d.ts +114 -0
- package/dist/storage/scope-index-store.js +236 -0
- package/dist/types/pipeline.d.ts +6 -3
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +2 -1
- package/hooks/claude/gitnexus-hook.cjs +2 -1
- package/hooks/claude/resolve-analyze-cmd.cjs +323 -0
- package/package.json +4 -5
- package/scripts/bench-scope-resolution.ts +1 -3
- package/scripts/cross-platform-tests.ts +4 -1
- package/skills/gitnexus-cli.md +8 -6
- package/skills/gitnexus-debugging.md +15 -15
- package/skills/gitnexus-exploring.md +11 -11
- package/skills/gitnexus-guide.md +1 -1
- package/skills/gitnexus-impact-analysis.md +10 -10
- package/skills/gitnexus-pr-review.md +19 -19
- package/skills/gitnexus-refactoring.md +25 -25
- package/web/assets/{agent-BRX-afm3.js → agent-EkX7webX.js} +156 -131
- package/web/assets/{architectureDiagram-UL44E2DR-B1oYB8-c.js → architectureDiagram-UL44E2DR-BoczH8cv.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-SPC6pgWI.js → chunk-LCXTWHL2-By5HB3b-.js} +1 -1
- package/web/assets/{chunk-RG4AUYOV-DZXr4Yv3.js → chunk-RG4AUYOV-BQE_DkpL.js} +1 -1
- package/web/assets/{classDiagram-KGZ6W3CR-BqpOj8L9.js → classDiagram-KGZ6W3CR-Dj_02GUH.js} +1 -1
- package/web/assets/{classDiagram-v2-72OJOZXJ-FmElywK2.js → classDiagram-v2-72OJOZXJ-D-NArMpf.js} +1 -1
- package/web/assets/{diagram-3NCE3AQN-BWtJXMDq.js → diagram-3NCE3AQN-VXtXDO95.js} +1 -1
- package/web/assets/{diagram-GF46GFSD-Hh-fChxU.js → diagram-GF46GFSD-B1qab2Ah.js} +1 -1
- package/web/assets/{diagram-QXG6HAR7-DYeQHxGU.js → diagram-QXG6HAR7-BSCHGzzT.js} +1 -1
- package/web/assets/{diagram-WEQXMOUZ-DYGU4T0y.js → diagram-WEQXMOUZ-DHtknmNT.js} +1 -1
- package/web/assets/{erDiagram-L5TCEMPS-bN3wlP2A.js → erDiagram-L5TCEMPS-Db-IYTmm.js} +1 -1
- package/web/assets/{flowDiagram-H6V6AXG4-YACVtF3-.js → flowDiagram-H6V6AXG4-BHDoyVoW.js} +1 -1
- package/web/assets/{index-BhnAdWTt.js → index-BR0IhgbR.js} +10 -10
- package/web/assets/{infoDiagram-3YFTVSEB-BWBzD28-.js → infoDiagram-3YFTVSEB-6h8wbWEe.js} +1 -1
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js → ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js} +1 -1
- package/web/assets/{kanban-definition-75IXJCU3-BeoPr5Tl.js → kanban-definition-75IXJCU3-CIIEZfqV.js} +1 -1
- package/web/assets/{mindmap-definition-2TDM6QVE-CdLLN_so.js → mindmap-definition-2TDM6QVE-DUAqydRq.js} +1 -1
- package/web/assets/{pieDiagram-CU6KROY3-DEd2a_k_.js → pieDiagram-CU6KROY3-BntYuYZa.js} +1 -1
- package/web/assets/{requirementDiagram-JXO7QTGE-QNeTo5C_.js → requirementDiagram-JXO7QTGE-QCD6I29n.js} +1 -1
- package/web/assets/{sequenceDiagram-VS2MUI6T-BHC7q7yJ.js → sequenceDiagram-VS2MUI6T-DScFwLz2.js} +1 -1
- package/web/assets/{stateDiagram-7D4R322I-KONnc2Px.js → stateDiagram-7D4R322I-AkRAm6Hl.js} +1 -1
- package/web/assets/{stateDiagram-v2-36443NZ5-C2QfuMlu.js → stateDiagram-v2-36443NZ5-BCK1vigR.js} +1 -1
- package/web/assets/{timeline-definition-O6YCAMPW-D4t4NJx1.js → timeline-definition-O6YCAMPW-BvpIVXjX.js} +1 -1
- package/web/assets/{vennDiagram-MWXL3ELB-6bctC9Yg.js → vennDiagram-MWXL3ELB-BYGWk6dK.js} +1 -1
- package/web/assets/{wardleyDiagram-CUQ6CDDI-BPZYNTvC.js → wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js} +1 -1
- package/web/assets/{xychartDiagram-N2JHSOCM-lBI9O6DW.js → xychartDiagram-N2JHSOCM-2N6NCSWN.js} +1 -1
- package/web/index.html +1 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +0 -63
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +0 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.js +0 -122
- package/dist/_shared/scope-resolution/shadow/aggregate.js.map +0 -1
- package/dist/_shared/scope-resolution/shadow/diff.d.ts +0 -59
- package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +0 -1
- package/dist/_shared/scope-resolution/shadow/diff.js +0 -79
- package/dist/_shared/scope-resolution/shadow/diff.js.map +0 -1
- package/dist/core/ingestion/ast-cache.d.ts +0 -26
- package/dist/core/ingestion/ast-cache.js +0 -48
- package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +0 -13
- package/dist/core/ingestion/heritage-extractors/configs/go.js +0 -20
- package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +0 -18
- package/dist/core/ingestion/heritage-extractors/configs/ruby.js +0 -65
- package/dist/core/ingestion/heritage-extractors/generic.d.ts +0 -23
- package/dist/core/ingestion/heritage-extractors/generic.js +0 -47
- package/dist/core/ingestion/heritage-processor.d.ts +0 -54
- package/dist/core/ingestion/heritage-processor.js +0 -367
- package/dist/core/ingestion/heritage-types.d.ts +0 -73
- package/dist/core/ingestion/heritage-types.js +0 -2
- package/dist/core/ingestion/import-processor.d.ts +0 -23
- package/dist/core/ingestion/import-processor.js +0 -377
- package/dist/core/ingestion/model/heritage-map.d.ts +0 -105
- package/dist/core/ingestion/model/heritage-map.js +0 -294
- package/dist/core/ingestion/model/resolution-context.d.ts +0 -93
- package/dist/core/ingestion/model/resolution-context.js +0 -337
- package/dist/core/ingestion/named-bindings/csharp.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/csharp.js +0 -37
- package/dist/core/ingestion/named-bindings/java.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/java.js +0 -29
- package/dist/core/ingestion/named-bindings/kotlin.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/kotlin.js +0 -36
- package/dist/core/ingestion/named-bindings/php.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/php.js +0 -61
- package/dist/core/ingestion/named-bindings/python.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/python.js +0 -49
- package/dist/core/ingestion/named-bindings/rust.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/rust.js +0 -66
- package/dist/core/ingestion/named-bindings/types.d.ts +0 -16
- package/dist/core/ingestion/named-bindings/types.js +0 -6
- package/dist/core/ingestion/named-bindings/typescript.d.ts +0 -3
- package/dist/core/ingestion/named-bindings/typescript.js +0 -58
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +0 -17
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +0 -209
- package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +0 -22
- package/dist/core/ingestion/pipeline-phases/orm-extraction.js +0 -92
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +0 -70
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +0 -312
- package/dist/core/ingestion/registry-primary-flag.d.ts +0 -89
- package/dist/core/ingestion/registry-primary-flag.js +0 -122
- package/dist/core/ingestion/shadow-harness.d.ts +0 -113
- package/dist/core/ingestion/shadow-harness.js +0 -148
- package/dist/core/ingestion/utils/ruby-self-call.d.ts +0 -52
- package/dist/core/ingestion/utils/ruby-self-call.js +0 -59
- package/scripts/ci-list-migrated-languages.ts +0 -24
- package/scripts/run-parity.ts +0 -128
|
@@ -14,7 +14,6 @@ import { kotlinTypeConfig } from '../type-extractors/jvm.js';
|
|
|
14
14
|
import { kotlinExportChecker } from '../export-detection.js';
|
|
15
15
|
import { createImportResolver } from '../import-resolvers/resolver-factory.js';
|
|
16
16
|
import { kotlinImportConfig } from '../import-resolvers/configs/jvm.js';
|
|
17
|
-
import { extractKotlinNamedBindings } from '../named-bindings/kotlin.js';
|
|
18
17
|
import { appendKotlinWildcard } from '../import-resolvers/jvm.js';
|
|
19
18
|
import { KOTLIN_QUERIES } from '../tree-sitter-queries.js';
|
|
20
19
|
import { createCallExtractor } from '../call-extractors/generic.js';
|
|
@@ -25,8 +24,7 @@ import { createMethodExtractor } from '../method-extractors/generic.js';
|
|
|
25
24
|
import { kotlinMethodConfig } from '../method-extractors/configs/jvm.js';
|
|
26
25
|
import { createVariableExtractor } from '../variable-extractors/generic.js';
|
|
27
26
|
import { kotlinVariableConfig } from '../variable-extractors/configs/jvm.js';
|
|
28
|
-
import {
|
|
29
|
-
import { emitKotlinScopeCaptures, interpretKotlinImport, interpretKotlinTypeBinding, kotlinArityCompatibility, kotlinBindingScopeFor, kotlinImportOwningScope, kotlinMergeBindings, kotlinReceiverBinding, } from './kotlin/index.js';
|
|
27
|
+
import { collectKotlinCaptureSideChannel, emitKotlinScopeCaptures, interpretKotlinImport, interpretKotlinTypeBinding, kotlinArityCompatibility, kotlinBindingScopeFor, kotlinImportOwningScope, kotlinMergeBindings, kotlinReceiverBinding, } from './kotlin/index.js';
|
|
30
28
|
/** Check if a Kotlin function_declaration capture is inside a class_body (i.e., a method).
|
|
31
29
|
* Kotlin grammar uses function_declaration for both top-level functions and class methods.
|
|
32
30
|
* Returns true when the captured definition node has a class_body ancestor. */
|
|
@@ -145,7 +143,6 @@ export const kotlinProvider = defineLanguage({
|
|
|
145
143
|
typeConfig: kotlinTypeConfig,
|
|
146
144
|
exportChecker: kotlinExportChecker,
|
|
147
145
|
importResolver: createImportResolver(kotlinImportConfig),
|
|
148
|
-
namedBindingExtractor: extractKotlinNamedBindings,
|
|
149
146
|
importPathPreprocessor: appendKotlinWildcard,
|
|
150
147
|
mroStrategy: 'implements-split',
|
|
151
148
|
callExtractor: createCallExtractor(kotlinCallConfig),
|
|
@@ -153,7 +150,6 @@ export const kotlinProvider = defineLanguage({
|
|
|
153
150
|
methodExtractor: createMethodExtractor(kotlinMethodConfig),
|
|
154
151
|
variableExtractor: createVariableExtractor(kotlinVariableConfig),
|
|
155
152
|
classExtractor: createClassExtractor(kotlinClassConfig),
|
|
156
|
-
heritageExtractor: createHeritageExtractor(SupportedLanguages.Kotlin),
|
|
157
153
|
builtInNames: BUILT_INS,
|
|
158
154
|
labelOverride: (functionNode, defaultLabel) => {
|
|
159
155
|
if (defaultLabel !== 'Function')
|
|
@@ -164,6 +160,13 @@ export const kotlinProvider = defineLanguage({
|
|
|
164
160
|
},
|
|
165
161
|
// ── RFC #909 Ring 3: scope-based resolution hooks ──
|
|
166
162
|
emitScopeCaptures: emitKotlinScopeCaptures,
|
|
163
|
+
// Worker-side: snapshot the module-level companion-scope marks
|
|
164
|
+
// `emitKotlinScopeCaptures` just populated for this file (`markCompanionScope`
|
|
165
|
+
// → `companionScopesByFile`) into plain data on `ParsedFile.captureSideChannel`,
|
|
166
|
+
// so the main thread can restore them via `applyCaptureSideChannel` WITHOUT a
|
|
167
|
+
// re-parse (#1983). Without this, companion/static dispatch emits no CALLS
|
|
168
|
+
// edges on the worker path. See `kotlin/capture-side-channel.ts`.
|
|
169
|
+
collectCaptureSideChannel: collectKotlinCaptureSideChannel,
|
|
167
170
|
interpretImport: interpretKotlinImport,
|
|
168
171
|
interpretTypeBinding: interpretKotlinTypeBinding,
|
|
169
172
|
bindingScopeFor: kotlinBindingScopeFor,
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Pure given the input source text. No I/O, no globals consulted.
|
|
32
32
|
*/
|
|
33
|
-
import {
|
|
33
|
+
import { nodeIfType, nodeToCapture, syntheticCapture, walkNamedTree, } from '../../utils/ast-helpers.js';
|
|
34
34
|
import { splitNamespaceUseDeclaration } from './import-decomposer.js';
|
|
35
35
|
import { computePhpArityMetadata } from './arity-metadata.js';
|
|
36
36
|
import { synthesizePhpReceiverBinding } from './receiver-binding.js';
|
|
@@ -89,9 +89,16 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
89
89
|
// Group captures by their tag name. Tree-sitter strips the leading
|
|
90
90
|
// `@`; we put it back so the central extractor's prefix lookups work.
|
|
91
91
|
const grouped = {};
|
|
92
|
+
// Parallel tag -> captured SyntaxNode map: the query hands us each matched
|
|
93
|
+
// node as c.node, so anchors resolve via a type-guarded lookup (nodeIfType)
|
|
94
|
+
// instead of re-deriving them with findNodeAtRange(tree.rootNode, ...) per
|
|
95
|
+
// match — the O(matches x rootChildren) root-walk fixed for go #1915 /
|
|
96
|
+
// python #1918, mirrored here.
|
|
97
|
+
const nodeMap = {};
|
|
92
98
|
for (const c of m.captures) {
|
|
93
99
|
const tag = '@' + c.name;
|
|
94
100
|
grouped[tag] = nodeToCapture(tag, c.node);
|
|
101
|
+
nodeMap[tag] = c.node;
|
|
95
102
|
}
|
|
96
103
|
if (Object.keys(grouped).length === 0)
|
|
97
104
|
continue;
|
|
@@ -157,8 +164,7 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
157
164
|
// Decompose each `namespace_use_declaration` so `interpretPhpImport`
|
|
158
165
|
// sees the kind/source/name/alias markers it consumes.
|
|
159
166
|
if (grouped['@import.statement'] !== undefined) {
|
|
160
|
-
const
|
|
161
|
-
const stmtNode = findNodeAtRange(tree.rootNode, stmtCapture.range, 'namespace_use_declaration');
|
|
167
|
+
const stmtNode = nodeIfType(nodeMap['@import.statement'], 'namespace_use_declaration');
|
|
162
168
|
if (stmtNode !== null) {
|
|
163
169
|
const decomposed = splitNamespaceUseDeclaration(stmtNode);
|
|
164
170
|
if (decomposed.length > 0) {
|
|
@@ -175,8 +181,7 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
175
181
|
// non-static method-like. Mirrors C#'s `this` / `base` synthesis.
|
|
176
182
|
if (grouped['@scope.function'] !== undefined) {
|
|
177
183
|
out.push(grouped);
|
|
178
|
-
const
|
|
179
|
-
const fnNode = findFunctionNode(tree.rootNode, anchor.range);
|
|
184
|
+
const fnNode = nodeIfType(nodeMap['@scope.function'], ...FUNCTION_NODE_TYPES);
|
|
180
185
|
if (fnNode !== null) {
|
|
181
186
|
for (const synth of synthesizePhpReceiverBinding(fnNode)) {
|
|
182
187
|
out.push(synth);
|
|
@@ -196,8 +201,7 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
196
201
|
// registry can narrow overloads.
|
|
197
202
|
const declTag = FUNCTION_DECL_TAGS.find((t) => grouped[t] !== undefined);
|
|
198
203
|
if (declTag !== undefined) {
|
|
199
|
-
const
|
|
200
|
-
const fnNode = findFunctionNode(tree.rootNode, anchor.range);
|
|
204
|
+
const fnNode = nodeIfType(nodeMap[declTag], ...FUNCTION_NODE_TYPES);
|
|
201
205
|
if (fnNode !== null) {
|
|
202
206
|
const arity = computePhpArityMetadata(fnNode);
|
|
203
207
|
if (arity.parameterCount !== undefined) {
|
|
@@ -217,12 +221,7 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
217
221
|
// lines 149-186). PHP needs this for arity-based dispatch (Cluster H).
|
|
218
222
|
const callTag = ['@reference.call.free', '@reference.call.member', '@reference.call.constructor'].find((t) => grouped[t] !== undefined);
|
|
219
223
|
if (callTag !== undefined && grouped['@reference.arity'] === undefined) {
|
|
220
|
-
const
|
|
221
|
-
const callNode = findNodeAtRange(tree.rootNode, anchor.range, 'function_call_expression') ??
|
|
222
|
-
findNodeAtRange(tree.rootNode, anchor.range, 'member_call_expression') ??
|
|
223
|
-
findNodeAtRange(tree.rootNode, anchor.range, 'nullsafe_member_call_expression') ??
|
|
224
|
-
findNodeAtRange(tree.rootNode, anchor.range, 'scoped_call_expression') ??
|
|
225
|
-
findNodeAtRange(tree.rootNode, anchor.range, 'object_creation_expression');
|
|
224
|
+
const callNode = nodeIfType(nodeMap[callTag], 'function_call_expression', 'member_call_expression', 'nullsafe_member_call_expression', 'scoped_call_expression', 'object_creation_expression');
|
|
226
225
|
if (callNode !== null) {
|
|
227
226
|
const argList = callNode.childForFieldName('arguments');
|
|
228
227
|
const args = [];
|
|
@@ -242,17 +241,134 @@ export function emitPhpScopeCaptures(sourceText, _filePath, cachedTree) {
|
|
|
242
241
|
}
|
|
243
242
|
out.push(grouped);
|
|
244
243
|
}
|
|
244
|
+
out.push(...synthesizePhpInheritanceReferences(tree.rootNode));
|
|
245
245
|
return out;
|
|
246
246
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
// ─── PHP inheritance synthesis ───────────────────────────────────────────────
|
|
248
|
+
/**
|
|
249
|
+
* Synthesize `@reference.inherits` captures from PHP class/trait heritage so
|
|
250
|
+
* the registry-primary scope-resolution path emits EXTENDS / IMPLEMENTS edges
|
|
251
|
+
* (mirrors C# `synthesizeCsharpInheritanceReferences` / C++
|
|
252
|
+
* `emitCppInheritanceCaptures`). Without this, PHP inheritance edges came only
|
|
253
|
+
* from the legacy heritage-capture leg (removed in #942), which the worker
|
|
254
|
+
* pipeline drops for registry-primary languages (issue #1951).
|
|
255
|
+
*
|
|
256
|
+
* Scope matches the legacy PHP heritage query (tree-sitter-queries.ts
|
|
257
|
+
* PHP_QUERIES extends / implements / trait-use captures):
|
|
258
|
+
*
|
|
259
|
+
* 1. `class_declaration` > `base_clause` > [(name) (qualified_name)] — extends
|
|
260
|
+
* 2. `class_declaration` > `class_interface_clause` > [(name) (qualified_name)] — implements
|
|
261
|
+
* 3. `class_declaration` body `use_declaration` > [(name) (qualified_name)] — trait use
|
|
262
|
+
* 4. `trait_declaration` body `use_declaration` > [(name) (qualified_name)] — trait use
|
|
263
|
+
*
|
|
264
|
+
* The EXTENDS-vs-IMPLEMENTS split is decided downstream from the resolved
|
|
265
|
+
* target's symbol kind (`preEmitInheritanceEdges`: `Interface` → IMPLEMENTS,
|
|
266
|
+
* else EXTENDS), so all bases emit the same `inherits` kind here. The base
|
|
267
|
+
* lookup name is normalized to its bare simple identifier (`Foo\Bar\Base` →
|
|
268
|
+
* `Base`) to match the V1 simple-name `findClassBindingInScope` contract.
|
|
269
|
+
*
|
|
270
|
+
* NOTE (#1951 trait-use parity): a PHP `use Trait;` is emitted as an IMPLEMENTS
|
|
271
|
+
* edge — `preEmitInheritanceEdges` (run.ts) maps a
|
|
272
|
+
* resolved `Interface` OR `Trait` target to IMPLEMENTS (`type === 'Interface'
|
|
273
|
+
* || type === 'Trait' ? 'IMPLEMENTS' : 'EXTENDS'`), so `use Trait` resolves to
|
|
274
|
+
* IMPLEMENTS on both the legacy and registry-primary paths.
|
|
275
|
+
*/
|
|
276
|
+
function synthesizePhpInheritanceReferences(root) {
|
|
277
|
+
const out = [];
|
|
278
|
+
walkNamedTree(root, (node) => {
|
|
279
|
+
if (node.type === 'class_declaration') {
|
|
280
|
+
// extends: single base_clause child carrying one base name.
|
|
281
|
+
const baseClause = findNamedChild(node, 'base_clause');
|
|
282
|
+
if (baseClause !== null)
|
|
283
|
+
emitPhpBaseNames(baseClause, out);
|
|
284
|
+
// implements: class_interface_clause may list several interfaces.
|
|
285
|
+
const ifaceClause = findNamedChild(node, 'class_interface_clause');
|
|
286
|
+
if (ifaceClause !== null)
|
|
287
|
+
emitPhpBaseNames(ifaceClause, out);
|
|
288
|
+
// trait use: `use TraitName;` inside the class body.
|
|
289
|
+
emitPhpTraitUses(node, out);
|
|
290
|
+
}
|
|
291
|
+
else if (node.type === 'trait_declaration') {
|
|
292
|
+
// trait-uses-trait: `use OtherTrait;` inside a trait body.
|
|
293
|
+
emitPhpTraitUses(node, out);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
return out;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Emit `@reference.inherits` for every `use_declaration` (trait use) in the
|
|
300
|
+
* declaration body of `node` (a class_declaration or trait_declaration).
|
|
301
|
+
* Class-body `use_declaration` is the trait-use node (distinct from the
|
|
302
|
+
* top-level `namespace_use_declaration` import node).
|
|
303
|
+
*/
|
|
304
|
+
function emitPhpTraitUses(node, out) {
|
|
305
|
+
const body = node.childForFieldName('body');
|
|
306
|
+
if (body === null || body.type !== 'declaration_list')
|
|
307
|
+
return;
|
|
308
|
+
for (let i = 0; i < body.namedChildCount; i++) {
|
|
309
|
+
const child = body.namedChild(i);
|
|
310
|
+
if (child !== null && child.type === 'use_declaration') {
|
|
311
|
+
emitPhpBaseNames(child, out);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Walk the named children of a heritage clause (`base_clause`,
|
|
317
|
+
* `class_interface_clause`, or `use_declaration`) and emit one
|
|
318
|
+
* `@reference.inherits` match per `name` / `qualified_name` base. The lookup
|
|
319
|
+
* name is the bare tail identifier so `findClassBindingInScope` resolves it.
|
|
320
|
+
*/
|
|
321
|
+
function emitPhpBaseNames(clause, out) {
|
|
322
|
+
for (let i = 0; i < clause.namedChildCount; i++) {
|
|
323
|
+
const base = clause.namedChild(i);
|
|
324
|
+
if (base === null)
|
|
325
|
+
continue;
|
|
326
|
+
if (base.type !== 'name' && base.type !== 'qualified_name')
|
|
327
|
+
continue;
|
|
328
|
+
const bareName = phpBareBaseName(base);
|
|
329
|
+
if (bareName === '')
|
|
330
|
+
continue;
|
|
331
|
+
out.push({
|
|
332
|
+
'@reference.inherits': nodeToCapture('@reference.inherits', base),
|
|
333
|
+
'@reference.name': syntheticCapture('@reference.name', base, bareName),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Normalize a PHP base node to its bare simple identifier:
|
|
339
|
+
* `Base` (name) → `Base`
|
|
340
|
+
* `Foo\Bar\Base` (qualified_name)→ `Base` (last `name` child)
|
|
341
|
+
* `\Foo\Base` (qualified_name)→ `Base`
|
|
342
|
+
* Mirrors C#'s `terminalTypeNameNode`: strip the qualifier tail so the V1
|
|
343
|
+
* simple-name scope-chain lookup resolves the target def.
|
|
344
|
+
*/
|
|
345
|
+
function phpBareBaseName(base) {
|
|
346
|
+
if (base.type === 'name')
|
|
347
|
+
return base.text;
|
|
348
|
+
if (base.type === 'qualified_name') {
|
|
349
|
+
// qualified_name holds one or more `name` children (plus `\` separators);
|
|
350
|
+
// the bare class is the last `name` child.
|
|
351
|
+
for (let i = base.namedChildCount - 1; i >= 0; i--) {
|
|
352
|
+
const child = base.namedChild(i);
|
|
353
|
+
if (child !== null && child.type === 'name')
|
|
354
|
+
return child.text;
|
|
355
|
+
}
|
|
356
|
+
// Fallback: split the raw text on the namespace separator.
|
|
357
|
+
const segs = base.text.split('\\').filter((s) => s.length > 0);
|
|
358
|
+
return segs.length > 0 ? segs[segs.length - 1] : '';
|
|
359
|
+
}
|
|
360
|
+
return '';
|
|
361
|
+
}
|
|
362
|
+
/** Find the first named child of `node` with the given type. */
|
|
363
|
+
function findNamedChild(node, type) {
|
|
364
|
+
for (let i = 0; i < node.namedChildCount; i++) {
|
|
365
|
+
const child = node.namedChild(i);
|
|
366
|
+
if (child !== null && child.type === type)
|
|
367
|
+
return child;
|
|
253
368
|
}
|
|
254
369
|
return null;
|
|
255
370
|
}
|
|
371
|
+
/** Pre-order walk over named children, invoking `cb` on each node. */
|
|
256
372
|
// ─── PHP receiver normalization ──────────────────────────────────────────────
|
|
257
373
|
/**
|
|
258
374
|
* Normalize a PHP receiver expression so the language-agnostic
|
|
@@ -36,11 +36,21 @@ export function splitNamespaceUseDeclaration(stmtNode) {
|
|
|
36
36
|
if (groupNode !== null) {
|
|
37
37
|
return decomposeGrouped(stmtNode, groupNode, qualifier);
|
|
38
38
|
}
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
// Non-grouped: iterate namespace_use_clause children (one per comma-separated
|
|
40
|
+
// import in `use A, B, C;`). The first import is also a namespace_use_clause
|
|
41
|
+
// in the grammar version used by the monorepo; namespace_name child handling
|
|
42
|
+
// was removed after confirming the clause wrapper covers all positions.
|
|
43
|
+
const out = [];
|
|
44
|
+
for (let i = 0; i < stmtNode.namedChildCount; i++) {
|
|
45
|
+
const child = stmtNode.namedChild(i);
|
|
46
|
+
if (child === null || child.type !== 'namespace_use_clause')
|
|
47
|
+
continue;
|
|
48
|
+
const spec = parseUseClause(child, qualifier);
|
|
49
|
+
if (spec !== null) {
|
|
50
|
+
out.push(buildImportMatch(stmtNode, spec));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
44
54
|
}
|
|
45
55
|
// ── Qualifier detection ────────────────────────────────────────────────────
|
|
46
56
|
/**
|
|
@@ -61,29 +71,6 @@ function detectQualifier(node) {
|
|
|
61
71
|
return 'const';
|
|
62
72
|
return 'namespace';
|
|
63
73
|
}
|
|
64
|
-
// ── Single clause parsing ──────────────────────────────────────────────────
|
|
65
|
-
function parseSingleUseClause(node, qualifier) {
|
|
66
|
-
// A plain `namespace_use_declaration` has one or more
|
|
67
|
-
// `namespace_use_clause` named children (each clause is one import,
|
|
68
|
-
// comma-separated for multiple). For the single case there is one.
|
|
69
|
-
const clause = findNamedChild(node, 'namespace_use_clause');
|
|
70
|
-
if (clause !== null)
|
|
71
|
-
return parseUseClause(clause, qualifier);
|
|
72
|
-
// Older grammar versions may put the qualified_name directly under
|
|
73
|
-
// the declaration node. Check for a qualified_name or name child.
|
|
74
|
-
const qualName = findNamedChild(node, 'qualified_name') ?? findNamedChild(node, 'name');
|
|
75
|
-
if (qualName === null)
|
|
76
|
-
return null;
|
|
77
|
-
const source = qualName.text.trim();
|
|
78
|
-
if (source === '')
|
|
79
|
-
return null;
|
|
80
|
-
return {
|
|
81
|
-
kind: qualifier,
|
|
82
|
-
source,
|
|
83
|
-
name: lastSegment(source),
|
|
84
|
-
atNode: node,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
74
|
function parseUseClause(clause, qualifier) {
|
|
88
75
|
// namespace_use_clause:
|
|
89
76
|
// qualified_name (or name)
|
|
@@ -97,23 +84,7 @@ function parseUseClause(clause, qualifier) {
|
|
|
97
84
|
const source = qualName.text.trim();
|
|
98
85
|
if (source === '')
|
|
99
86
|
return null;
|
|
100
|
-
// Strategy
|
|
101
|
-
const aliasClause = findNamedChild(clause, 'alias_clause');
|
|
102
|
-
if (aliasClause !== null) {
|
|
103
|
-
// alias_clause: "as" name
|
|
104
|
-
const aliasName = findNamedChild(aliasClause, 'name') ?? aliasClause.firstNamedChild;
|
|
105
|
-
const alias = aliasName?.text.trim() ?? '';
|
|
106
|
-
if (alias === '')
|
|
107
|
-
return null;
|
|
108
|
-
return {
|
|
109
|
-
kind: 'alias',
|
|
110
|
-
source,
|
|
111
|
-
name: alias,
|
|
112
|
-
alias,
|
|
113
|
-
atNode: clause,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
// Strategy 2: bare sibling `name` node after the qualified_name.
|
|
87
|
+
// Strategy: bare sibling `name` node after the qualified_name.
|
|
117
88
|
// tree-sitter-php (≥ 0.22) emits `use Foo\Bar as Baz` as:
|
|
118
89
|
// namespace_use_clause
|
|
119
90
|
// qualified_name "Foo\Bar"
|
|
@@ -152,8 +123,10 @@ function parseUseClause(clause, qualifier) {
|
|
|
152
123
|
* `const` keyword inside the group.
|
|
153
124
|
*/
|
|
154
125
|
function decomposeGrouped(stmtNode, groupNode, outerQualifier) {
|
|
155
|
-
// The prefix is the
|
|
156
|
-
|
|
126
|
+
// The prefix is the namespace_name that precedes the `{...}` group.
|
|
127
|
+
// tree-sitter-php emits the leading path as a namespace_name child,
|
|
128
|
+
// not qualified_name.
|
|
129
|
+
const prefixNode = findNamedChild(stmtNode, 'namespace_name') ?? findNamedChild(stmtNode, 'name');
|
|
157
130
|
const prefix = prefixNode?.text.trim() ?? '';
|
|
158
131
|
const out = [];
|
|
159
132
|
for (let i = 0; i < groupNode.namedChildCount; i++) {
|
|
@@ -197,22 +170,7 @@ function parseInnerClause(clause, prefix, qualifier) {
|
|
|
197
170
|
if (innerPath === '')
|
|
198
171
|
return null;
|
|
199
172
|
const source = prefix !== '' ? `${prefix}\\${innerPath}` : innerPath;
|
|
200
|
-
// Strategy
|
|
201
|
-
const aliasClause = findNamedChild(clause, 'alias_clause');
|
|
202
|
-
if (aliasClause !== null) {
|
|
203
|
-
const aliasName = findNamedChild(aliasClause, 'name') ?? aliasClause.firstNamedChild;
|
|
204
|
-
const alias = aliasName?.text.trim() ?? '';
|
|
205
|
-
if (alias === '')
|
|
206
|
-
return null;
|
|
207
|
-
return {
|
|
208
|
-
kind: 'alias',
|
|
209
|
-
source,
|
|
210
|
-
name: alias,
|
|
211
|
-
alias,
|
|
212
|
-
atNode: clause,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
// Strategy 2: bare sibling `name` node after the qualified_name (tree-sitter-php ≥ 0.22).
|
|
173
|
+
// Strategy: bare sibling `name` node after the qualified_name (tree-sitter-php ≥ 0.22).
|
|
216
174
|
if (clause.namedChildCount >= 2) {
|
|
217
175
|
const lastChild = clause.namedChild(clause.namedChildCount - 1);
|
|
218
176
|
if (lastChild !== null && lastChild !== qualName && lastChild.type === 'name') {
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
* 6. **Intersection types in parameters** — `T&U $param` takes the first
|
|
55
55
|
* named part (`T`). This matches the legacy type-extractor's behavior.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* `test/integration/resolvers/php.test.ts`.
|
|
57
|
+
* The `test/integration/resolvers/php.test.ts` resolver suite is the
|
|
58
|
+
* authoritative signal for which of these matter in practice; it runs in
|
|
59
|
+
* the standard CI test workflow, so a regression blocks the merge.
|
|
61
60
|
*/
|
|
62
61
|
export { emitPhpScopeCaptures } from './captures.js';
|
|
63
62
|
export { getPhpCaptureCacheStats, resetPhpCaptureCacheStats } from './cache-stats.js';
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
* 6. **Intersection types in parameters** — `T&U $param` takes the first
|
|
55
55
|
* named part (`T`). This matches the legacy type-extractor's behavior.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* `test/integration/resolvers/php.test.ts`.
|
|
57
|
+
* The `test/integration/resolvers/php.test.ts` resolver suite is the
|
|
58
|
+
* authoritative signal for which of these matter in practice; it runs in
|
|
59
|
+
* the standard CI test workflow, so a regression blocks the merge.
|
|
61
60
|
*/
|
|
62
61
|
export { emitPhpScopeCaptures } from './captures.js';
|
|
63
62
|
export { getPhpCaptureCacheStats, resetPhpCaptureCacheStats } from './cache-stats.js';
|
|
@@ -51,6 +51,7 @@ const PHP_SCOPE_QUERY = `
|
|
|
51
51
|
(interface_declaration) @scope.class
|
|
52
52
|
(trait_declaration) @scope.class
|
|
53
53
|
(enum_declaration) @scope.class
|
|
54
|
+
(anonymous_class) @scope.class
|
|
54
55
|
|
|
55
56
|
(method_declaration) @scope.function
|
|
56
57
|
(function_definition) @scope.function
|
|
@@ -71,6 +72,10 @@ const PHP_SCOPE_QUERY = `
|
|
|
71
72
|
(enum_declaration
|
|
72
73
|
name: (name) @declaration.name) @declaration.enum
|
|
73
74
|
|
|
75
|
+
;; Enum case
|
|
76
|
+
(enum_case
|
|
77
|
+
name: (name) @declaration.name) @declaration.const
|
|
78
|
+
|
|
74
79
|
;; ── Declarations — methods / functions / constructors ─────────────────────
|
|
75
80
|
|
|
76
81
|
(method_declaration
|
|
@@ -24,6 +24,11 @@ const TYPE_DECL_NODE_TYPES = new Set([
|
|
|
24
24
|
'interface_declaration',
|
|
25
25
|
'trait_declaration',
|
|
26
26
|
'enum_declaration',
|
|
27
|
+
// tree-sitter-php node for `new class {...}` (real node is `anonymous_class`,
|
|
28
|
+
// not `anonymous_class_declaration`). Included so the enclosing-type walk
|
|
29
|
+
// stops AT the anon class and the guard below skips it (otherwise a method in
|
|
30
|
+
// an anon class nested in a named class would mis-bind $this to the outer class).
|
|
31
|
+
'anonymous_class',
|
|
27
32
|
]);
|
|
28
33
|
const FUNCTION_NODE_TYPES = new Set([
|
|
29
34
|
'method_declaration',
|
|
@@ -94,7 +99,7 @@ export function synthesizePhpReceiverBinding(fnNode) {
|
|
|
94
99
|
if (enclosingType === null)
|
|
95
100
|
return [];
|
|
96
101
|
// Anonymous class — skip (no stable name).
|
|
97
|
-
if (enclosingType.type === '
|
|
102
|
+
if (enclosingType.type === 'anonymous_class')
|
|
98
103
|
return [];
|
|
99
104
|
const enclosingName = typeName(enclosingType);
|
|
100
105
|
if (enclosingName === null)
|
|
@@ -102,9 +107,8 @@ export function synthesizePhpReceiverBinding(fnNode) {
|
|
|
102
107
|
// Anchor the synthesized captures to the method body (compound_statement)
|
|
103
108
|
// so they land inside the function scope, not at the class scope.
|
|
104
109
|
// For interface/abstract methods that have no body, skip.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
fnNode.childForFieldName('return_value');
|
|
110
|
+
// tree-sitter-php arrow_function also exposes its expression via the `body` field.
|
|
111
|
+
const bodyNode = fnNode.childForFieldName('body');
|
|
108
112
|
if (bodyNode === null)
|
|
109
113
|
return [];
|
|
110
114
|
const out = [];
|
|
@@ -14,7 +14,6 @@ import { typeConfig as phpConfig } from '../type-extractors/php.js';
|
|
|
14
14
|
import { phpExportChecker } from '../export-detection.js';
|
|
15
15
|
import { createImportResolver } from '../import-resolvers/resolver-factory.js';
|
|
16
16
|
import { phpImportConfig } from '../import-resolvers/configs/php.js';
|
|
17
|
-
import { extractPhpNamedBindings } from '../named-bindings/php.js';
|
|
18
17
|
import { PHP_QUERIES } from '../tree-sitter-queries.js';
|
|
19
18
|
import { findDescendant, extractStringContent } from '../utils/ast-helpers.js';
|
|
20
19
|
import { createFieldExtractor } from '../field-extractors/generic.js';
|
|
@@ -25,7 +24,6 @@ import { createVariableExtractor } from '../variable-extractors/generic.js';
|
|
|
25
24
|
import { phpVariableConfig } from '../variable-extractors/configs/php.js';
|
|
26
25
|
import { createCallExtractor } from '../call-extractors/generic.js';
|
|
27
26
|
import { phpCallConfig } from '../call-extractors/configs/php.js';
|
|
28
|
-
import { createHeritageExtractor } from '../heritage-extractors/generic.js';
|
|
29
27
|
const BUILT_INS = new Set([
|
|
30
28
|
'echo',
|
|
31
29
|
'isset',
|
|
@@ -263,13 +261,11 @@ export const phpProvider = defineLanguage({
|
|
|
263
261
|
typeConfig: phpConfig,
|
|
264
262
|
exportChecker: phpExportChecker,
|
|
265
263
|
importResolver: createImportResolver(phpImportConfig),
|
|
266
|
-
namedBindingExtractor: extractPhpNamedBindings,
|
|
267
264
|
callExtractor: createCallExtractor(phpCallConfig),
|
|
268
265
|
fieldExtractor: createFieldExtractor(phpFieldConfig),
|
|
269
266
|
methodExtractor: createMethodExtractor(phpMethodConfig),
|
|
270
267
|
variableExtractor: createVariableExtractor(phpVariableConfig),
|
|
271
268
|
classExtractor: createClassExtractor(phpClassConfig),
|
|
272
|
-
heritageExtractor: createHeritageExtractor(SupportedLanguages.PHP),
|
|
273
269
|
descriptionExtractor: phpDescriptionExtractor,
|
|
274
270
|
isRouteFile: isPhpRouteFile,
|
|
275
271
|
builtInNames: BUILT_INS,
|