cgraphx 2.0.2 → 2.0.3
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/dist/core/code/engine/cli/analyze-config.js +320 -0
- package/dist/core/code/engine/cli/analyze.js +1086 -0
- package/dist/core/code/engine/cli/cli-message.js +83 -0
- package/dist/core/code/engine/cli/detect-changes-format.js +58 -0
- package/dist/core/code/engine/cli/embedding-dims.js +43 -0
- package/dist/core/code/engine/cli/format-elapsed.js +12 -0
- package/dist/core/code/engine/cli/help-i18n.js +144 -0
- package/dist/core/code/engine/cli/i18n/en.js +110 -0
- package/dist/core/code/engine/cli/i18n/index.js +47 -0
- package/dist/core/code/engine/cli/i18n/resources.js +9 -0
- package/dist/core/code/engine/cli/i18n/zh-CN.js +110 -0
- package/dist/core/code/engine/cli/lazy-action.js +67 -0
- package/dist/core/code/engine/cli/optional-grammars.js +136 -0
- package/dist/core/code/engine/cli/resolve-invocation.js +76 -0
- package/dist/core/code/engine/cli/status.js +156 -0
- package/dist/core/code/engine/cli/tool.js +384 -0
- package/dist/core/code/engine/config/ignore-service.js +511 -0
- package/dist/core/code/engine/config/supported-languages.js +17 -0
- package/dist/core/code/engine/core/analysis-features.js +64 -0
- package/dist/core/code/engine/core/analyzer-identity.js +2171 -0
- package/dist/core/code/engine/core/git-staleness.js +180 -0
- package/dist/core/code/engine/core/graph/graph.js +180 -0
- package/dist/core/code/engine/core/graph/import-cycles.js +106 -0
- package/dist/core/code/engine/core/graph/types.js +2 -0
- package/dist/core/code/engine/core/index-freshness.js +12 -0
- package/dist/core/code/engine/core/ingestion/binding-accumulator.js +341 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/c-cpp.js +168 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/csharp.js +9 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/dart.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/go.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/jvm.js +54 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/php.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/python.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/ruby.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/rust.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/swift.js +8 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/configs/typescript-javascript.js +11 -0
- package/dist/core/code/engine/core/ingestion/call-extractors/generic.js +62 -0
- package/dist/core/code/engine/core/ingestion/call-processor.js +503 -0
- package/dist/core/code/engine/core/ingestion/call-routing.js +98 -0
- package/dist/core/code/engine/core/ingestion/call-types.js +3 -0
- package/dist/core/code/engine/core/ingestion/cfg/callee-cell-format.js +45 -0
- package/dist/core/code/engine/core/ingestion/cfg/cfg-builder.js +202 -0
- package/dist/core/code/engine/core/ingestion/cfg/collect.js +81 -0
- package/dist/core/code/engine/core/ingestion/cfg/control-dependence.js +185 -0
- package/dist/core/code/engine/core/ingestion/cfg/control-flow-context.js +130 -0
- package/dist/core/code/engine/core/ingestion/cfg/emit.js +646 -0
- package/dist/core/code/engine/core/ingestion/cfg/post-dominators.js +182 -0
- package/dist/core/code/engine/core/ingestion/cfg/reaching-def-reason-codec.js +139 -0
- package/dist/core/code/engine/core/ingestion/cfg/reaching-defs-graph.js +322 -0
- package/dist/core/code/engine/core/ingestion/cfg/reaching-defs.js +792 -0
- package/dist/core/code/engine/core/ingestion/cfg/synthetic-escape.js +305 -0
- package/dist/core/code/engine/core/ingestion/cfg/traversal-result.js +6 -0
- package/dist/core/code/engine/core/ingestion/cfg/types.js +14 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/c-cpp-harvest.js +545 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/c-cpp.js +590 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/call-site-harvest.js +356 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/csharp-harvest.js +593 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/csharp.js +871 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/dart-harvest.js +874 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/dart.js +840 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/go-harvest.js +625 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/go.js +642 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/java-harvest.js +517 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/java.js +816 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/kotlin-harvest.js +723 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/kotlin.js +813 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/php-harvest.js +630 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/php.js +725 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/python-harvest.js +776 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/python.js +562 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/ruby-harvest.js +591 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/ruby.js +760 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/rust-harvest.js +877 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/rust.js +562 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/scope-tree-harvest.js +120 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/swift-harvest.js +683 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/swift.js +791 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/typescript-harvest.js +1060 -0
- package/dist/core/code/engine/core/ingestion/cfg/visitors/typescript.js +587 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/c-cpp.js +77 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/csharp.js +24 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/dart.js +10 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/go.js +28 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/jvm.js +67 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/php.js +10 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/python.js +10 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/ruby.js +13 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/rust.js +10 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/swift.js +21 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/configs/typescript-javascript.js +31 -0
- package/dist/core/code/engine/core/ingestion/class-extractors/generic.js +144 -0
- package/dist/core/code/engine/core/ingestion/class-types.js +2 -0
- package/dist/core/code/engine/core/ingestion/cluster-enricher.js +174 -0
- package/dist/core/code/engine/core/ingestion/community-processor.js +604 -0
- package/dist/core/code/engine/core/ingestion/constants.js +26 -0
- package/dist/core/code/engine/core/ingestion/cpp-ue-preprocessor.js +263 -0
- package/dist/core/code/engine/core/ingestion/csharp-namespace-gate.js +133 -0
- package/dist/core/code/engine/core/ingestion/di-extractors/index.js +38 -0
- package/dist/core/code/engine/core/ingestion/di-extractors/spring.js +310 -0
- package/dist/core/code/engine/core/ingestion/emit-references.js +244 -0
- package/dist/core/code/engine/core/ingestion/entry-point-scoring.js +201 -0
- package/dist/core/code/engine/core/ingestion/export-detection.js +244 -0
- package/dist/core/code/engine/core/ingestion/field-extractor.js +29 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/c-cpp.js +107 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/csharp.js +124 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/dart.js +99 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/go.js +102 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/helpers.js +198 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/jvm.js +172 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/php.js +67 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/python.js +94 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/ruby.js +79 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/rust.js +55 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/swift.js +93 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/configs/typescript-javascript.js +59 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/generic.js +147 -0
- package/dist/core/code/engine/core/ingestion/field-extractors/typescript.js +266 -0
- package/dist/core/code/engine/core/ingestion/field-types.js +3 -0
- package/dist/core/code/engine/core/ingestion/filesystem-walker.js +136 -0
- package/dist/core/code/engine/core/ingestion/finalize-orchestrator.js +159 -0
- package/dist/core/code/engine/core/ingestion/framework-detection.js +432 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/analysis-features.js +38 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/annotation-arguments.js +234 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/aop-candidates.js +88 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/aop.js +487 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/auto-configuration.js +21 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/bean-candidates.js +189 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/bean-catalog.js +32 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/bean-factories.js +73 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/conditionals.js +323 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/config-bindings.js +119 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/di-metadata.js +385 -0
- package/dist/core/code/engine/core/ingestion/frameworks/spring/resource-injection.js +96 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/c-cpp.js +17 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/csharp.js +46 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/dart.js +59 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/go.js +30 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/jvm.js +73 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/php.js +19 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/python.js +45 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/ruby.js +20 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/rust.js +58 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/swift.js +94 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/configs/typescript-javascript.js +26 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/csharp.js +128 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/go.js +50 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/jvm.js +112 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/php.js +80 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/python.js +75 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/resolver-factory.js +36 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/ruby.js +20 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/rust.js +79 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/standard.js +180 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/types.js +7 -0
- package/dist/core/code/engine/core/ingestion/import-resolvers/utils.js +153 -0
- package/dist/core/code/engine/core/ingestion/import-target-adapter.js +99 -0
- package/dist/core/code/engine/core/ingestion/language-config.js +391 -0
- package/dist/core/code/engine/core/ingestion/language-provider.js +25 -0
- package/dist/core/code/engine/core/ingestion/languages/c/arity-metadata.js +98 -0
- package/dist/core/code/engine/core/ingestion/languages/c/arity.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/c/capture-side-channel.js +69 -0
- package/dist/core/code/engine/core/ingestion/languages/c/captures.js +189 -0
- package/dist/core/code/engine/core/ingestion/languages/c/header-scan.js +58 -0
- package/dist/core/code/engine/core/ingestion/languages/c/import-decomposer.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/c/import-target.js +103 -0
- package/dist/core/code/engine/core/ingestion/languages/c/index.js +33 -0
- package/dist/core/code/engine/core/ingestion/languages/c/interpret.js +53 -0
- package/dist/core/code/engine/core/ingestion/languages/c/merge-bindings.js +26 -0
- package/dist/core/code/engine/core/ingestion/languages/c/query.js +210 -0
- package/dist/core/code/engine/core/ingestion/languages/c/scope-resolver.js +112 -0
- package/dist/core/code/engine/core/ingestion/languages/c/simple-hooks.js +24 -0
- package/dist/core/code/engine/core/ingestion/languages/c/static-linkage.js +109 -0
- package/dist/core/code/engine/core/ingestion/languages/c-cpp.js +506 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/adl.js +804 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/arity-metadata.js +258 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/arity.js +37 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/capture-side-channel.js +89 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/captures.js +1975 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/constraint-extractor.js +311 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/constraint-filter.js +210 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/conversion-rank.js +163 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/file-local-linkage.js +327 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/header-scan.js +53 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/import-decomposer.js +134 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/import-target.js +16 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/index.js +33 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/inline-namespaces.js +379 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/interpret.js +239 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/member-lookup.js +470 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/merge-bindings.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/query.js +763 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/range-bindings.js +230 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/scope-resolver.js +354 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/simple-hooks.js +67 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/two-phase-lookup.js +348 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/type-classifier.js +56 -0
- package/dist/core/code/engine/core/ingestion/languages/cpp/user-defined-conversions.js +128 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/accessor-unwrap.js +67 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/arity-metadata.js +49 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/arity.js +40 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/cache-stats.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/captures.js +557 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/import-decomposer.js +96 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/import-target.js +176 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/index.js +95 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/interpret.js +150 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/merge-bindings.js +58 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/namespace-siblings.js +708 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/qualified-type-names.js +62 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/query.js +578 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/receiver-binding.js +142 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/resolution-config.js +18 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/scope-resolver.js +84 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp/simple-hooks.js +81 -0
- package/dist/core/code/engine/core/ingestion/languages/csharp.js +204 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/arity-metadata.js +38 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/arity.js +34 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/built-ins.js +37 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/cache-stats.js +30 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/captures.js +1096 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/expand-wildcards.js +34 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/extension-type-preprocess.js +33 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/import-target.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/index.js +45 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/interpret.js +101 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/merge-bindings.js +42 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/query.js +246 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/receiver-binding.js +90 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/scope-resolver.js +197 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/signature-bindings.js +54 -0
- package/dist/core/code/engine/core/ingestion/languages/dart/simple-hooks.js +61 -0
- package/dist/core/code/engine/core/ingestion/languages/dart.js +138 -0
- package/dist/core/code/engine/core/ingestion/languages/go/arity-metadata.js +71 -0
- package/dist/core/code/engine/core/ingestion/languages/go/arity.js +17 -0
- package/dist/core/code/engine/core/ingestion/languages/go/cache-stats.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/go/captures.js +492 -0
- package/dist/core/code/engine/core/ingestion/languages/go/expand-wildcards.js +97 -0
- package/dist/core/code/engine/core/ingestion/languages/go/generic-type-parameters.js +146 -0
- package/dist/core/code/engine/core/ingestion/languages/go/import-decomposer.js +47 -0
- package/dist/core/code/engine/core/ingestion/languages/go/import-target.js +70 -0
- package/dist/core/code/engine/core/ingestion/languages/go/index.js +39 -0
- package/dist/core/code/engine/core/ingestion/languages/go/interface-impls.js +955 -0
- package/dist/core/code/engine/core/ingestion/languages/go/interpret.js +177 -0
- package/dist/core/code/engine/core/ingestion/languages/go/merge-bindings.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/go/method-owners.js +131 -0
- package/dist/core/code/engine/core/ingestion/languages/go/namespace-mirror.js +56 -0
- package/dist/core/code/engine/core/ingestion/languages/go/package-clause.js +79 -0
- package/dist/core/code/engine/core/ingestion/languages/go/package-siblings.js +83 -0
- package/dist/core/code/engine/core/ingestion/languages/go/query.js +298 -0
- package/dist/core/code/engine/core/ingestion/languages/go/range-binding.js +127 -0
- package/dist/core/code/engine/core/ingestion/languages/go/receiver-binding.js +24 -0
- package/dist/core/code/engine/core/ingestion/languages/go/scope-resolver.js +75 -0
- package/dist/core/code/engine/core/ingestion/languages/go/simple-hooks.js +31 -0
- package/dist/core/code/engine/core/ingestion/languages/go/type-binding.js +279 -0
- package/dist/core/code/engine/core/ingestion/languages/go.js +160 -0
- package/dist/core/code/engine/core/ingestion/languages/index.js +66 -0
- package/dist/core/code/engine/core/ingestion/languages/java/analysis-features.js +16 -0
- package/dist/core/code/engine/core/ingestion/languages/java/arity-metadata.js +43 -0
- package/dist/core/code/engine/core/ingestion/languages/java/arity.js +27 -0
- package/dist/core/code/engine/core/ingestion/languages/java/cache-stats.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/java/capture-side-channel.js +123 -0
- package/dist/core/code/engine/core/ingestion/languages/java/captures.js +791 -0
- package/dist/core/code/engine/core/ingestion/languages/java/import-decomposer.js +88 -0
- package/dist/core/code/engine/core/ingestion/languages/java/import-target.js +103 -0
- package/dist/core/code/engine/core/ingestion/languages/java/index.js +43 -0
- package/dist/core/code/engine/core/ingestion/languages/java/interpret.js +146 -0
- package/dist/core/code/engine/core/ingestion/languages/java/merge-bindings.js +43 -0
- package/dist/core/code/engine/core/ingestion/languages/java/package-facts.js +16 -0
- package/dist/core/code/engine/core/ingestion/languages/java/package-siblings.js +11 -0
- package/dist/core/code/engine/core/ingestion/languages/java/query.js +319 -0
- package/dist/core/code/engine/core/ingestion/languages/java/receiver-binding.js +98 -0
- package/dist/core/code/engine/core/ingestion/languages/java/scope-resolver.js +213 -0
- package/dist/core/code/engine/core/ingestion/languages/java/simple-hooks.js +39 -0
- package/dist/core/code/engine/core/ingestion/languages/java/spring-aop.js +53 -0
- package/dist/core/code/engine/core/ingestion/languages/java/spring-bean-metadata.js +11 -0
- package/dist/core/code/engine/core/ingestion/languages/java/spring-conditionals.js +52 -0
- package/dist/core/code/engine/core/ingestion/languages/java/spring-config-bindings.js +222 -0
- package/dist/core/code/engine/core/ingestion/languages/java/spring-di.js +165 -0
- package/dist/core/code/engine/core/ingestion/languages/java.js +192 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/arity.js +15 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/captures.js +1122 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/import-target.js +56 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/index.js +109 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/interpret.js +45 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/merge-bindings.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/query.js +659 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/scope-resolver.js +78 -0
- package/dist/core/code/engine/core/ingestion/languages/javascript/simple-hooks.js +44 -0
- package/dist/core/code/engine/core/ingestion/languages/jvm/package-facts.js +46 -0
- package/dist/core/code/engine/core/ingestion/languages/jvm/package-siblings.js +200 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/arity-metadata.js +23 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/arity.js +18 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/cache-stats.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/capture-side-channel.js +160 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/captures.js +1262 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/companion-scopes.js +72 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/import-decomposer.js +40 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/import-target.js +135 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/index.js +26 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/interpret.js +75 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/merge-bindings.js +28 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/owners.js +134 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/package-facts.js +16 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/package-siblings.js +11 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/query.js +243 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/receiver-binding.js +103 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/scope-resolver.js +207 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/simple-hooks.js +42 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/spring-aop.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/spring-bean-metadata.js +11 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/spring-conditionals.js +53 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin/spring-di.js +304 -0
- package/dist/core/code/engine/core/ingestion/languages/kotlin.js +189 -0
- package/dist/core/code/engine/core/ingestion/languages/php/arity-metadata.js +66 -0
- package/dist/core/code/engine/core/ingestion/languages/php/arity.js +43 -0
- package/dist/core/code/engine/core/ingestion/languages/php/cache-stats.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/php/captures.js +1166 -0
- package/dist/core/code/engine/core/ingestion/languages/php/import-decomposer.js +238 -0
- package/dist/core/code/engine/core/ingestion/languages/php/import-target.js +213 -0
- package/dist/core/code/engine/core/ingestion/languages/php/index.js +85 -0
- package/dist/core/code/engine/core/ingestion/languages/php/interpret.js +256 -0
- package/dist/core/code/engine/core/ingestion/languages/php/merge-bindings.js +50 -0
- package/dist/core/code/engine/core/ingestion/languages/php/namespace-siblings.js +353 -0
- package/dist/core/code/engine/core/ingestion/languages/php/query.js +391 -0
- package/dist/core/code/engine/core/ingestion/languages/php/receiver-binding.js +135 -0
- package/dist/core/code/engine/core/ingestion/languages/php/scope-resolver.js +361 -0
- package/dist/core/code/engine/core/ingestion/languages/php/simple-hooks.js +116 -0
- package/dist/core/code/engine/core/ingestion/languages/php.js +302 -0
- package/dist/core/code/engine/core/ingestion/languages/python/arity-metadata.js +49 -0
- package/dist/core/code/engine/core/ingestion/languages/python/arity.js +41 -0
- package/dist/core/code/engine/core/ingestion/languages/python/cache-stats.js +34 -0
- package/dist/core/code/engine/core/ingestion/languages/python/captures.js +299 -0
- package/dist/core/code/engine/core/ingestion/languages/python/depends-references.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/python/import-decomposer.js +115 -0
- package/dist/core/code/engine/core/ingestion/languages/python/import-target.js +440 -0
- package/dist/core/code/engine/core/ingestion/languages/python/index-stats.js +30 -0
- package/dist/core/code/engine/core/ingestion/languages/python/index.js +96 -0
- package/dist/core/code/engine/core/ingestion/languages/python/interpret.js +430 -0
- package/dist/core/code/engine/core/ingestion/languages/python/merge-bindings.js +47 -0
- package/dist/core/code/engine/core/ingestion/languages/python/query.js +323 -0
- package/dist/core/code/engine/core/ingestion/languages/python/receiver-binding.js +310 -0
- package/dist/core/code/engine/core/ingestion/languages/python/scope-resolver.js +80 -0
- package/dist/core/code/engine/core/ingestion/languages/python/simple-hooks.js +53 -0
- package/dist/core/code/engine/core/ingestion/languages/python.js +140 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/arity.js +41 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/cache-stats.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/captures.js +864 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/import-target.js +88 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/index.js +29 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/interpret.js +115 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/merge-bindings.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/query.js +349 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/receiver-binding.js +70 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/scope-resolver.js +263 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby/simple-hooks.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/ruby.js +215 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/arity.js +16 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/cache-stats.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/captures.js +304 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/import-decomposer.js +167 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/import-target.js +108 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/index.js +29 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/interpret.js +201 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/merge-bindings.js +21 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/method-owners.js +76 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/module-path.js +222 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/qualified-call.js +482 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/query.js +280 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/range-binding.js +687 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/receiver-binding.js +148 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/scope-resolver.js +151 -0
- package/dist/core/code/engine/core/ingestion/languages/rust/simple-hooks.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/rust.js +183 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/arity-metadata.js +44 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/arity.js +45 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/base-type.js +30 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/cache-stats.js +32 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/captures.js +594 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/conditional-directive-preprocess.js +256 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/implicit-imports.js +60 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/import-decomposer.js +87 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/import-target.js +84 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/index.js +56 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/interpret.js +93 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/merge-bindings.js +51 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/query.js +226 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/receiver-binding.js +169 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/scope-resolver.js +192 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/sibling-type-bindings.js +68 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/signature-bindings.js +69 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/simple-hooks.js +65 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/target-grouping.js +97 -0
- package/dist/core/code/engine/core/ingestion/languages/swift/target-siblings.js +74 -0
- package/dist/core/code/engine/core/ingestion/languages/swift.js +246 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/arity-metadata.js +106 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/arity.js +57 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/array-callback.js +58 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/cache-stats.js +34 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/captures.js +956 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/cjs-export-assignment.js +535 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/cjs-module-exports.js +196 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/import-decomposer.js +374 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/import-target.js +65 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/index.js +108 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/interpret.js +344 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/merge-bindings.js +161 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/nuxt-auto-imports.js +325 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/query.js +1328 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/receiver-binding.js +201 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/scope-resolver.js +293 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript/simple-hooks.js +139 -0
- package/dist/core/code/engine/core/ingestion/languages/typescript.js +455 -0
- package/dist/core/code/engine/core/ingestion/languages/vue/captures.js +70 -0
- package/dist/core/code/engine/core/ingestion/languages/vue/import-target.js +61 -0
- package/dist/core/code/engine/core/ingestion/languages/vue/index.js +55 -0
- package/dist/core/code/engine/core/ingestion/languages/vue/scope-resolver.js +295 -0
- package/dist/core/code/engine/core/ingestion/languages/vue.js +96 -0
- package/dist/core/code/engine/core/ingestion/local-symbol-pruner.js +68 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/c-cpp.js +387 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/csharp.js +290 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/dart.js +392 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/go.js +179 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/jvm.js +350 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/php.js +306 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/python.js +312 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/ruby.js +289 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/rust.js +198 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/swift.js +286 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/configs/typescript-javascript.js +341 -0
- package/dist/core/code/engine/core/ingestion/method-extractors/generic.js +209 -0
- package/dist/core/code/engine/core/ingestion/method-types.js +3 -0
- package/dist/core/code/engine/core/ingestion/model/field-registry.js +41 -0
- package/dist/core/code/engine/core/ingestion/model/index.js +52 -0
- package/dist/core/code/engine/core/ingestion/model/method-registry.js +138 -0
- package/dist/core/code/engine/core/ingestion/model/owned-members-lookup.js +46 -0
- package/dist/core/code/engine/core/ingestion/model/registration-table.js +234 -0
- package/dist/core/code/engine/core/ingestion/model/resolve.js +183 -0
- package/dist/core/code/engine/core/ingestion/model/scope-resolution-indexes.js +43 -0
- package/dist/core/code/engine/core/ingestion/model/semantic-model.js +179 -0
- package/dist/core/code/engine/core/ingestion/model/symbol-table.js +216 -0
- package/dist/core/code/engine/core/ingestion/model/type-registry.js +84 -0
- package/dist/core/code/engine/core/ingestion/mro-processor.js +709 -0
- package/dist/core/code/engine/core/ingestion/parsing-processor.js +312 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/communities.js +69 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/cross-file.js +71 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/di.js +338 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/http-api-calls.js +312 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/index.js +54 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/mro.js +40 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/orm.js +78 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/parse-impl.js +1286 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/parse.js +41 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/processes.js +193 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/prune-local-symbols.js +29 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/registry.js +52 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/routes.js +409 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/rpc-edges.js +301 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/runner.js +207 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/scan.js +49 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/spring-aop.js +442 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/spring-auto-configuration.js +264 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/spring-config.js +440 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/structure.js +38 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/tools.js +89 -0
- package/dist/core/code/engine/core/ingestion/pipeline-phases/types.js +40 -0
- package/dist/core/code/engine/core/ingestion/pipeline.js +152 -0
- package/dist/core/code/engine/core/ingestion/process-processor.js +325 -0
- package/dist/core/code/engine/core/ingestion/resolve-references.js +205 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/constant-resolver.js +135 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/django-root-discovery.js +221 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/django.js +428 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/expo.js +39 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/fastapi-router-bindings.js +264 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/laravel.js +501 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/middleware.js +175 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/nextjs.js +81 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/php.js +25 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/python-const-resolver.js +307 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/response-shapes.js +299 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/route-path.js +71 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/spring-shared.js +310 -0
- package/dist/core/code/engine/core/ingestion/route-extractors/spring.js +441 -0
- package/dist/core/code/engine/core/ingestion/scope-extractor-bridge.js +60 -0
- package/dist/core/code/engine/core/ingestion/scope-extractor.js +1373 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/contract/scope-resolver.js +282 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +72 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/edges.js +194 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/ids.js +472 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.js +49 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/method-dispatch.js +43 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +274 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +93 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/callable-value-flow.js +1240 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/compound-receiver.js +1174 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/free-call-fallback.js +873 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/imported-return-types.js +226 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/mro.js +107 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/overload-narrowing.js +441 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/property-dispatch.js +122 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +1720 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/pipeline/phase.js +395 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/pipeline/reconcile-ownership.js +208 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/pipeline/registry.js +49 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/pipeline/run.js +632 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +112 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/resolution-outcome.js +41 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/scope/namespace-targets.js +81 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/scope/walkers.js +1835 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/unresolved-receivers.js +242 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/utils/definition-id.js +22 -0
- package/dist/core/code/engine/core/ingestion/scope-resolution/workspace-index.js +151 -0
- package/dist/core/code/engine/core/ingestion/structure-processor.js +40 -0
- package/dist/core/code/engine/core/ingestion/tree-sitter-queries.js +2244 -0
- package/dist/core/code/engine/core/ingestion/ts-js-hoc-utils.js +115 -0
- package/dist/core/code/engine/core/ingestion/type-env.js +1136 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/c-cpp.js +555 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/csharp.js +570 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/dart.js +372 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/go.js +508 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/jvm.js +875 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/php.js +537 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/python.js +477 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/ruby.js +380 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/rust.js +502 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/shared.js +843 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/swift.js +490 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/types.js +2 -0
- package/dist/core/code/engine/core/ingestion/type-extractors/typescript.js +690 -0
- package/dist/core/code/engine/core/ingestion/utils/ast-helpers.js +1693 -0
- package/dist/core/code/engine/core/ingestion/utils/call-analysis.js +779 -0
- package/dist/core/code/engine/core/ingestion/utils/callable-flow-captures.js +932 -0
- package/dist/core/code/engine/core/ingestion/utils/callable-labels.js +49 -0
- package/dist/core/code/engine/core/ingestion/utils/deferred-resolution-profile.js +151 -0
- package/dist/core/code/engine/core/ingestion/utils/effective-ram.js +67 -0
- package/dist/core/code/engine/core/ingestion/utils/env.js +60 -0
- package/dist/core/code/engine/core/ingestion/utils/event-loop.js +9 -0
- package/dist/core/code/engine/core/ingestion/utils/graph-sort.js +103 -0
- package/dist/core/code/engine/core/ingestion/utils/heap-probe.js +45 -0
- package/dist/core/code/engine/core/ingestion/utils/heritage-marker.js +47 -0
- package/dist/core/code/engine/core/ingestion/utils/line-base.js +24 -0
- package/dist/core/code/engine/core/ingestion/utils/max-file-size.js +59 -0
- package/dist/core/code/engine/core/ingestion/utils/method-props.js +198 -0
- package/dist/core/code/engine/core/ingestion/utils/qualified-name.js +73 -0
- package/dist/core/code/engine/core/ingestion/utils/receiver-chain-captures.js +60 -0
- package/dist/core/code/engine/core/ingestion/utils/receiver-chain-codec.js +188 -0
- package/dist/core/code/engine/core/ingestion/utils/scope-tree-walk.js +36 -0
- package/dist/core/code/engine/core/ingestion/utils/symbol-labels.js +48 -0
- package/dist/core/code/engine/core/ingestion/utils/template-arguments.js +187 -0
- package/dist/core/code/engine/core/ingestion/utils/type-parameters.js +209 -0
- package/dist/core/code/engine/core/ingestion/utils/verbose.js +6 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/c-cpp.js +133 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/csharp.js +66 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/dart.js +111 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/go.js +153 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/jvm.js +145 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/php.js +61 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/python.js +104 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/ruby.js +55 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/rust.js +79 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/swift.js +91 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/configs/typescript-javascript.js +86 -0
- package/dist/core/code/engine/core/ingestion/variable-extractors/generic.js +111 -0
- package/dist/core/code/engine/core/ingestion/variable-types.js +3 -0
- package/dist/core/code/engine/core/ingestion/vue-sfc-extractor.js +544 -0
- package/dist/core/code/engine/core/ingestion/workers/callable-id.js +122 -0
- package/dist/core/code/engine/core/ingestion/workers/clone-safety.js +470 -0
- package/dist/core/code/engine/core/ingestion/workers/parse-worker.js +2456 -0
- package/dist/core/code/engine/core/ingestion/workers/post-result.js +90 -0
- package/dist/core/code/engine/core/ingestion/workers/quarantine.js +41 -0
- package/dist/core/code/engine/core/ingestion/workers/result-merge.js +59 -0
- package/dist/core/code/engine/core/ingestion/workers/worker-pool.js +1725 -0
- package/dist/core/code/engine/core/ingestion/workspace-config.js +139 -0
- package/dist/core/code/engine/core/lbug/conn-lock.js +72 -0
- package/dist/core/code/engine/core/lbug/csv-generator.js +710 -0
- package/dist/core/code/engine/core/lbug/cypher-escape.js +24 -0
- package/dist/core/code/engine/core/lbug/extension-load-error.js +339 -0
- package/dist/core/code/engine/core/lbug/extension-loader.js +261 -0
- package/dist/core/code/engine/core/lbug/graph-emit-sink.js +584 -0
- package/dist/core/code/engine/core/lbug/lbug-adapter.js +2703 -0
- package/dist/core/code/engine/core/lbug/lbug-config.js +1029 -0
- package/dist/core/code/engine/core/lbug/native-check.js +435 -0
- package/dist/core/code/engine/core/lbug/pool-adapter.js +973 -0
- package/dist/core/code/engine/core/lbug/query-params.js +25 -0
- package/dist/core/code/engine/core/lbug/query-result-utils.js +31 -0
- package/dist/core/code/engine/core/lbug/rel-pair-routing.js +373 -0
- package/dist/core/code/engine/core/lbug/schema.js +771 -0
- package/dist/core/code/engine/core/lbug/shutdown-helpers.js +40 -0
- package/dist/core/code/engine/core/lbug/sidecar-recovery.js +716 -0
- package/dist/core/code/engine/core/lbug/stdio-capture.js +49 -0
- package/dist/core/code/engine/core/lbug/sync-csv-writer.js +115 -0
- package/dist/core/code/engine/core/lbug/wal-checkpoint-driver.js +215 -0
- package/dist/core/code/engine/core/lbug/wal-driver-state.js +28 -0
- package/dist/core/code/engine/core/logger.js +339 -0
- package/dist/core/code/engine/core/platform/capabilities.js +91 -0
- package/dist/core/code/engine/core/run-analyze.js +1098 -0
- package/dist/core/code/engine/core/tree-sitter/parser-loader.js +281 -0
- package/dist/core/code/engine/core/tree-sitter/safe-parse.js +258 -0
- package/dist/core/code/engine/core/tree-sitter/vendored-grammars.js +64 -0
- package/dist/core/code/engine/lib/utils.js +121 -0
- package/dist/core/code/engine/mcp/core/lbug-adapter.js +27 -0
- package/dist/core/code/engine/mcp/local/aop-metadata.js +230 -0
- package/dist/core/code/engine/mcp/local/bean-metadata.js +49 -0
- package/dist/core/code/engine/mcp/local/limits.js +15 -0
- package/dist/core/code/engine/mcp/local/line-display.js +6 -0
- package/dist/core/code/engine/mcp/local/local-backend.js +4142 -0
- package/dist/core/code/engine/storage/branch-index.js +72 -0
- package/dist/core/code/engine/storage/file-hash.js +95 -0
- package/dist/core/code/engine/storage/fs-atomic.js +34 -0
- package/dist/core/code/engine/storage/git.js +555 -0
- package/dist/core/code/engine/storage/index-lock.js +664 -0
- package/dist/core/code/engine/storage/parse-cache.js +650 -0
- package/dist/core/code/engine/storage/parsedfile-store.js +620 -0
- package/dist/core/code/engine/storage/repo-manager.js +1061 -0
- package/dist/core/code/engine/storage/scope-index-store.js +247 -0
- package/dist/core/code/engine/types/pipeline.js +2 -0
- package/dist/core/code/scripts/install-duckdb-extension.mjs +125 -0
- package/dist/core/code/scripts/resolve-analyze-cmd.cjs +346 -0
- package/dist/core/code/shared/graph/types.js +8 -0
- package/dist/core/code/shared/index.js +105 -0
- package/dist/core/code/shared/integrations/circuit-breaker.js +242 -0
- package/dist/core/code/shared/integrations/resilient-fetch.js +224 -0
- package/dist/core/code/shared/integrations/retry.js +70 -0
- package/dist/core/code/shared/integrations/understand-quickly.js +145 -0
- package/dist/core/code/shared/language-detection.js +162 -0
- package/dist/core/code/shared/languages.js +27 -0
- package/dist/core/code/shared/lbug/schema-constants.js +98 -0
- package/dist/core/code/shared/mro-strategy.js +2 -0
- package/dist/core/code/shared/pipeline.js +5 -0
- package/dist/core/code/shared/scope-resolution/callable-flow-site.js +11 -0
- package/dist/core/code/shared/scope-resolution/def-index.js +53 -0
- package/dist/core/code/shared/scope-resolution/evidence-weights.js +87 -0
- package/dist/core/code/shared/scope-resolution/finalize-algorithm.js +807 -0
- package/dist/core/code/shared/scope-resolution/language-classification.js +46 -0
- package/dist/core/code/shared/scope-resolution/method-dispatch-index.js +100 -0
- package/dist/core/code/shared/scope-resolution/module-scope-index.js +59 -0
- package/dist/core/code/shared/scope-resolution/origin-priority.js +23 -0
- package/dist/core/code/shared/scope-resolution/parsed-file.js +54 -0
- package/dist/core/code/shared/scope-resolution/position-index.js +136 -0
- package/dist/core/code/shared/scope-resolution/qualified-name-index.js +77 -0
- package/dist/core/code/shared/scope-resolution/reference-site.js +24 -0
- package/dist/core/code/shared/scope-resolution/registries/class-registry.js +32 -0
- package/dist/core/code/shared/scope-resolution/registries/context.js +52 -0
- package/dist/core/code/shared/scope-resolution/registries/evidence.js +152 -0
- package/dist/core/code/shared/scope-resolution/registries/field-registry.js +33 -0
- package/dist/core/code/shared/scope-resolution/registries/lookup-core.js +392 -0
- package/dist/core/code/shared/scope-resolution/registries/lookup-qualified.js +58 -0
- package/dist/core/code/shared/scope-resolution/registries/macro-registry.js +34 -0
- package/dist/core/code/shared/scope-resolution/registries/method-registry.js +34 -0
- package/dist/core/code/shared/scope-resolution/registries/tie-breaks.js +63 -0
- package/dist/core/code/shared/scope-resolution/resolve-type-ref.js +128 -0
- package/dist/core/code/shared/scope-resolution/scope-id.js +49 -0
- package/dist/core/code/shared/scope-resolution/scope-tree.js +225 -0
- package/dist/core/code/shared/scope-resolution/symbol-definition.js +12 -0
- package/dist/core/code/shared/scope-resolution/types.js +25 -0
- package/dist/core/code/shared/test-helpers.js +17 -0
- package/dist/core/code/vendor/leiden/index.cjs +355 -0
- package/dist/core/code/vendor/leiden/utils.cjs +419 -0
- package/dist/core/timeline/cli.d.ts.map +1 -1
- package/dist/core/timeline/cli.js +13 -6
- package/dist/core/timeline/cli.js.map +1 -1
- package/dist/core/timeline/debris.d.ts +20 -0
- package/dist/core/timeline/debris.d.ts.map +1 -0
- package/dist/core/timeline/debris.js +124 -0
- package/dist/core/timeline/debris.js.map +1 -0
- package/dist/core/timeline/hook-runner.d.ts.map +1 -1
- package/dist/core/timeline/hook-runner.js +3 -1
- package/dist/core/timeline/hook-runner.js.map +1 -1
- package/dist/core/timeline/hooks.d.ts.map +1 -1
- package/dist/core/timeline/hooks.js +13 -5
- package/dist/core/timeline/hooks.js.map +1 -1
- package/dist/core/timeline/installer.d.ts +2 -0
- package/dist/core/timeline/installer.d.ts.map +1 -1
- package/dist/core/timeline/installer.js +12 -0
- package/dist/core/timeline/installer.js.map +1 -1
- package/dist/core/timeline/project-root.d.ts +21 -0
- package/dist/core/timeline/project-root.d.ts.map +1 -0
- package/dist/core/timeline/project-root.js +83 -0
- package/dist/core/timeline/project-root.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.populateCsharpNamespacePrefixes = populateCsharpNamespacePrefixes;
|
|
4
|
+
const walkers_js_1 = require("../../scope-resolution/scope/walkers.js");
|
|
5
|
+
function isTypeDef(def) {
|
|
6
|
+
return (0, walkers_js_1.isClassLike)(def.type) || def.type === 'Enum';
|
|
7
|
+
}
|
|
8
|
+
function populateCsharpNamespacePrefixes(parsed) {
|
|
9
|
+
const scopesById = new Map();
|
|
10
|
+
for (const scope of parsed.scopes)
|
|
11
|
+
scopesById.set(scope.id, scope);
|
|
12
|
+
// The file's declared namespace (file-scoped `namespace X;`). First Namespace
|
|
13
|
+
// scope's own def qualifiedName; undefined when the file is namespace-free.
|
|
14
|
+
const fileNamespace = (() => {
|
|
15
|
+
for (const scope of parsed.scopes) {
|
|
16
|
+
if (scope.kind !== 'Namespace')
|
|
17
|
+
continue;
|
|
18
|
+
const nsDef = scope.ownedDefs.find((d) => d.type === 'Namespace');
|
|
19
|
+
const q = nsDef?.qualifiedName;
|
|
20
|
+
if (q !== undefined && q.length > 0)
|
|
21
|
+
return q;
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
})();
|
|
25
|
+
// Enclosing namespace path for a scope: nearest ancestor Namespace scope's
|
|
26
|
+
// full qualifiedName, else the file-scoped namespace (Module-parented types).
|
|
27
|
+
const namespaceOf = (scope) => {
|
|
28
|
+
let parentId = scope.parent;
|
|
29
|
+
while (parentId !== null) {
|
|
30
|
+
const parent = scopesById.get(parentId);
|
|
31
|
+
if (parent === undefined)
|
|
32
|
+
break;
|
|
33
|
+
if (parent.kind === 'Namespace') {
|
|
34
|
+
const nsDef = parent.ownedDefs.find((d) => d.type === 'Namespace');
|
|
35
|
+
const q = nsDef?.qualifiedName;
|
|
36
|
+
if (q !== undefined && q.length > 0)
|
|
37
|
+
return q;
|
|
38
|
+
}
|
|
39
|
+
if (parent.kind === 'Module')
|
|
40
|
+
return fileNamespace;
|
|
41
|
+
parentId = parent.parent;
|
|
42
|
+
}
|
|
43
|
+
return fileNamespace;
|
|
44
|
+
};
|
|
45
|
+
for (const scope of parsed.scopes) {
|
|
46
|
+
if (scope.kind !== 'Class')
|
|
47
|
+
continue;
|
|
48
|
+
const prefix = namespaceOf(scope);
|
|
49
|
+
if (prefix === undefined || prefix.length === 0)
|
|
50
|
+
continue;
|
|
51
|
+
for (const def of scope.ownedDefs) {
|
|
52
|
+
if (!isTypeDef(def))
|
|
53
|
+
continue;
|
|
54
|
+
if (def.namespacePrefix !== undefined)
|
|
55
|
+
continue;
|
|
56
|
+
const q = def.qualifiedName;
|
|
57
|
+
if (q === prefix || (q !== undefined && q.startsWith(`${prefix}.`)))
|
|
58
|
+
continue;
|
|
59
|
+
def.namespacePrefix = prefix;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tree-sitter query for C# scope captures (RFC §5.1).
|
|
4
|
+
*
|
|
5
|
+
* Captures the structural skeleton the generic scope-resolution
|
|
6
|
+
* pipeline consumes: scopes (module/namespace/class/function),
|
|
7
|
+
* declarations (class-likes, method-likes, properties, variables,
|
|
8
|
+
* local functions), imports (using directives), type bindings
|
|
9
|
+
* (parameter annotations, variable annotations, constructor
|
|
10
|
+
* inference), and references (call sites, member writes).
|
|
11
|
+
*
|
|
12
|
+
* C# specifics that shape this query:
|
|
13
|
+
*
|
|
14
|
+
* - Both block-scoped (`namespace X { }`) and file-scoped
|
|
15
|
+
* (`namespace X;`) namespaces. tree-sitter-c-sharp emits them
|
|
16
|
+
* under distinct node types (`namespace_declaration` vs
|
|
17
|
+
* `file_scoped_namespace_declaration`); both map to
|
|
18
|
+
* `@scope.namespace` since the scope semantics are identical.
|
|
19
|
+
* - `partial class X` splits a Class def across files. Each file
|
|
20
|
+
* emits its own `@declaration.class`; cross-file resolution is
|
|
21
|
+
* handled at the graph-bridge layer via the qualified-name key.
|
|
22
|
+
* - `using X = Y;` aliases and `using static X;` are interpreted in
|
|
23
|
+
* `interpret.ts` via the `@import.*` captures. All three using
|
|
24
|
+
* flavors share the same anchor (`@import.statement`).
|
|
25
|
+
* - Explicit interface implementations (`void IFoo.Bar() { }`)
|
|
26
|
+
* expose the qualified name via the existing `@declaration.name`
|
|
27
|
+
* — the extractor's `csharpMethodConfig.extractQualifiedName`
|
|
28
|
+
* picks up the explicit qualifier from the method declaration
|
|
29
|
+
* node.
|
|
30
|
+
*
|
|
31
|
+
* Exposes lazy `Parser` and `Query` singletons so callers don't pay
|
|
32
|
+
* tree-sitter init cost per file.
|
|
33
|
+
*/
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.getCsharpParser = getCsharpParser;
|
|
39
|
+
exports.getCsharpScopeQuery = getCsharpScopeQuery;
|
|
40
|
+
const tree_sitter_1 = __importDefault(require("tree-sitter"));
|
|
41
|
+
const node_module_1 = require("node:module");
|
|
42
|
+
// 懒加载(spec §7/§13):tree-sitter-c-sharp 移至 devDependencies,生产 --omit=dev 不装。
|
|
43
|
+
// 首次用到时按需 require + 缓存;失败 → null,该语言降级为结构层收录,不阻断 analyze。
|
|
44
|
+
const _require = (0, node_module_1.createRequire)(__filename);
|
|
45
|
+
let _csharpGrammar;
|
|
46
|
+
const loadCsharpGrammar = () => {
|
|
47
|
+
if (_csharpGrammar !== undefined)
|
|
48
|
+
return _csharpGrammar;
|
|
49
|
+
try {
|
|
50
|
+
_csharpGrammar = _require('tree-sitter-c-sharp');
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
_csharpGrammar = null;
|
|
54
|
+
}
|
|
55
|
+
return _csharpGrammar;
|
|
56
|
+
};
|
|
57
|
+
const CSHARP_SCOPE_QUERY = `
|
|
58
|
+
;; Scopes
|
|
59
|
+
(compilation_unit) @scope.module
|
|
60
|
+
|
|
61
|
+
(namespace_declaration) @scope.namespace
|
|
62
|
+
(file_scoped_namespace_declaration) @scope.namespace
|
|
63
|
+
|
|
64
|
+
(namespace_declaration
|
|
65
|
+
name: (_) @declaration.name) @declaration.namespace
|
|
66
|
+
|
|
67
|
+
(file_scoped_namespace_declaration
|
|
68
|
+
name: (_) @declaration.name) @declaration.namespace
|
|
69
|
+
|
|
70
|
+
(class_declaration) @scope.class
|
|
71
|
+
(interface_declaration) @scope.class
|
|
72
|
+
(struct_declaration) @scope.class
|
|
73
|
+
(record_declaration) @scope.class
|
|
74
|
+
(enum_declaration) @scope.class
|
|
75
|
+
|
|
76
|
+
(method_declaration) @scope.function
|
|
77
|
+
(constructor_declaration) @scope.function
|
|
78
|
+
(destructor_declaration) @scope.function
|
|
79
|
+
(local_function_statement) @scope.function
|
|
80
|
+
(operator_declaration) @scope.function
|
|
81
|
+
(conversion_operator_declaration) @scope.function
|
|
82
|
+
;; Property accessors are blocks within a property; not scoped here.
|
|
83
|
+
;; Anonymous methods / lambdas are not scoped — out of scope per plan.
|
|
84
|
+
|
|
85
|
+
;; Declarations — types
|
|
86
|
+
;; The parameter list is matched as an UNNAMED optional child, not through a
|
|
87
|
+
;; \`type_parameters:\` field: the C# grammar gives \`interface_declaration\` that
|
|
88
|
+
;; field but \`class_declaration\` / \`struct_declaration\` / \`record_declaration\`
|
|
89
|
+
;; only a bare \`type_parameter_list\` child, so the field form would silently
|
|
90
|
+
;; capture nothing on exactly the three most common declarations. The unnamed
|
|
91
|
+
;; form matches all four.
|
|
92
|
+
;;
|
|
93
|
+
;; A \`where T : IRepo\` constraint is a SEPARATE sibling clause
|
|
94
|
+
;; (\`type_parameter_constraints_clause\`) and is deliberately not read here — the
|
|
95
|
+
;; bound stays absent for C#, which reads as "unknown", the safe direction.
|
|
96
|
+
(class_declaration
|
|
97
|
+
name: (identifier) @declaration.name
|
|
98
|
+
(type_parameter_list)? @declaration.type-parameters) @declaration.class
|
|
99
|
+
|
|
100
|
+
(interface_declaration
|
|
101
|
+
name: (identifier) @declaration.name
|
|
102
|
+
(type_parameter_list)? @declaration.type-parameters) @declaration.interface
|
|
103
|
+
|
|
104
|
+
(struct_declaration
|
|
105
|
+
name: (identifier) @declaration.name
|
|
106
|
+
(type_parameter_list)? @declaration.type-parameters) @declaration.struct
|
|
107
|
+
|
|
108
|
+
(record_declaration
|
|
109
|
+
name: (identifier) @declaration.name
|
|
110
|
+
(type_parameter_list)? @declaration.type-parameters) @declaration.record
|
|
111
|
+
|
|
112
|
+
(enum_declaration
|
|
113
|
+
name: (identifier) @declaration.name) @declaration.enum
|
|
114
|
+
|
|
115
|
+
;; Declarations — methods / constructors / properties
|
|
116
|
+
(method_declaration
|
|
117
|
+
name: (identifier) @declaration.name) @declaration.method
|
|
118
|
+
|
|
119
|
+
(constructor_declaration
|
|
120
|
+
name: (identifier) @declaration.name) @declaration.constructor
|
|
121
|
+
|
|
122
|
+
(destructor_declaration
|
|
123
|
+
name: (identifier) @declaration.name) @declaration.method
|
|
124
|
+
|
|
125
|
+
(local_function_statement
|
|
126
|
+
name: (identifier) @declaration.name) @declaration.function
|
|
127
|
+
|
|
128
|
+
;; Operator declarations — \`public static T operator +(T a, T b)\`.
|
|
129
|
+
;; tree-sitter-c-sharp exposes the operator token under the \`operator:\`
|
|
130
|
+
;; field (an anonymous node like \`+\`, \`-\`, \`==\`). Capture the whole
|
|
131
|
+
;; node under @declaration.name so the extractor reads the operator
|
|
132
|
+
;; symbol as the declared name; downstream csharpMethodConfig can
|
|
133
|
+
;; normalize it (e.g. to \`op_Addition\`) when it runs.
|
|
134
|
+
(operator_declaration
|
|
135
|
+
operator: _ @declaration.name) @declaration.method
|
|
136
|
+
|
|
137
|
+
;; Conversion operators — \`public static explicit operator int(T x)\`.
|
|
138
|
+
;; No operator token; the target type (\`int\`) identifies the conversion
|
|
139
|
+
;; and serves as the name anchor.
|
|
140
|
+
(conversion_operator_declaration
|
|
141
|
+
type: _ @declaration.name) @declaration.method
|
|
142
|
+
|
|
143
|
+
(property_declaration
|
|
144
|
+
name: (identifier) @declaration.name) @declaration.property
|
|
145
|
+
|
|
146
|
+
(indexer_declaration) @declaration.property
|
|
147
|
+
|
|
148
|
+
;; Fields — \`int x;\` at class scope. variable_declarator inside
|
|
149
|
+
;; field_declaration carries the name.
|
|
150
|
+
(field_declaration
|
|
151
|
+
(variable_declaration
|
|
152
|
+
(variable_declarator
|
|
153
|
+
name: (identifier) @declaration.name))) @declaration.variable
|
|
154
|
+
|
|
155
|
+
;; Local variables — \`int x = 1;\` inside a method body
|
|
156
|
+
(local_declaration_statement
|
|
157
|
+
(variable_declaration
|
|
158
|
+
(variable_declarator
|
|
159
|
+
name: (identifier) @declaration.name))) @declaration.variable
|
|
160
|
+
|
|
161
|
+
;; Imports — single anchor per directive; interpretCsharpImport classifies
|
|
162
|
+
(using_directive) @import.statement
|
|
163
|
+
|
|
164
|
+
;; Type bindings — parameter annotations: \`void F(User u)\`
|
|
165
|
+
(parameter
|
|
166
|
+
type: (identifier) @type-binding.type
|
|
167
|
+
name: (identifier) @type-binding.name) @type-binding.parameter
|
|
168
|
+
|
|
169
|
+
(parameter
|
|
170
|
+
type: (generic_name) @type-binding.type
|
|
171
|
+
name: (identifier) @type-binding.name) @type-binding.parameter
|
|
172
|
+
|
|
173
|
+
(parameter
|
|
174
|
+
type: (qualified_name) @type-binding.type
|
|
175
|
+
name: (identifier) @type-binding.name) @type-binding.parameter
|
|
176
|
+
|
|
177
|
+
(parameter
|
|
178
|
+
type: (nullable_type) @type-binding.type
|
|
179
|
+
name: (identifier) @type-binding.name) @type-binding.parameter
|
|
180
|
+
|
|
181
|
+
;; Type bindings — local variable annotations: \`User u = new User();\`
|
|
182
|
+
;; Typed local with identifier type + \`new X()\` initializer — shape
|
|
183
|
+
;; matters so \`u\` binds to \`X\` (the constructor call's type), not the
|
|
184
|
+
;; declared type alias (which is usually the same, but \`new DerivedUser()\`
|
|
185
|
+
;; would be distinct).
|
|
186
|
+
(local_declaration_statement
|
|
187
|
+
(variable_declaration
|
|
188
|
+
type: (identifier) @type-binding.type
|
|
189
|
+
(variable_declarator
|
|
190
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
191
|
+
|
|
192
|
+
(local_declaration_statement
|
|
193
|
+
(variable_declaration
|
|
194
|
+
type: (generic_name) @type-binding.type
|
|
195
|
+
(variable_declarator
|
|
196
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
197
|
+
|
|
198
|
+
(local_declaration_statement
|
|
199
|
+
(variable_declaration
|
|
200
|
+
type: (qualified_name) @type-binding.type
|
|
201
|
+
(variable_declarator
|
|
202
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
203
|
+
|
|
204
|
+
;; Type bindings — \`var u = new User();\` — constructor-inferred.
|
|
205
|
+
;; Captures object_creation_expression's type as the binding type.
|
|
206
|
+
;; variable_declarator wraps the \`= <expr>\` directly; tree-sitter-c-sharp
|
|
207
|
+
;; does not surface an equals_value_clause wrapper here.
|
|
208
|
+
(local_declaration_statement
|
|
209
|
+
(variable_declaration
|
|
210
|
+
(variable_declarator
|
|
211
|
+
name: (identifier) @type-binding.name
|
|
212
|
+
(object_creation_expression
|
|
213
|
+
type: (identifier) @type-binding.type)))) @type-binding.constructor
|
|
214
|
+
|
|
215
|
+
(local_declaration_statement
|
|
216
|
+
(variable_declaration
|
|
217
|
+
(variable_declarator
|
|
218
|
+
name: (identifier) @type-binding.name
|
|
219
|
+
(object_creation_expression
|
|
220
|
+
type: (generic_name) @type-binding.type)))) @type-binding.constructor
|
|
221
|
+
|
|
222
|
+
(local_declaration_statement
|
|
223
|
+
(variable_declaration
|
|
224
|
+
(variable_declarator
|
|
225
|
+
name: (identifier) @type-binding.name
|
|
226
|
+
(object_creation_expression
|
|
227
|
+
type: (qualified_name) @type-binding.type)))) @type-binding.constructor
|
|
228
|
+
|
|
229
|
+
;; Type bindings — \`var u = factory();\` alias (chain-follow picks up
|
|
230
|
+
;; factory's return type via propagateImportedReturnTypes)
|
|
231
|
+
(local_declaration_statement
|
|
232
|
+
(variable_declaration
|
|
233
|
+
(variable_declarator
|
|
234
|
+
name: (identifier) @type-binding.name
|
|
235
|
+
(invocation_expression
|
|
236
|
+
function: (identifier) @type-binding.type)))) @type-binding.alias
|
|
237
|
+
|
|
238
|
+
;; Type bindings — identifier-to-identifier alias: \`var alias = u;\`.
|
|
239
|
+
;; The resolver's chain-follow walks from \`alias\` → \`u\` → u's
|
|
240
|
+
;; declared type, so we only need to tag the rename here.
|
|
241
|
+
(local_declaration_statement
|
|
242
|
+
(variable_declaration
|
|
243
|
+
type: (implicit_type)
|
|
244
|
+
(variable_declarator
|
|
245
|
+
name: (identifier) @type-binding.name
|
|
246
|
+
(identifier) @type-binding.type))) @type-binding.alias
|
|
247
|
+
|
|
248
|
+
;; Type bindings — chained method-call alias: \`var u = svc.GetUser();\`.
|
|
249
|
+
;; The chain-follow then walks GetUser's return-type binding.
|
|
250
|
+
(local_declaration_statement
|
|
251
|
+
(variable_declaration
|
|
252
|
+
type: (implicit_type)
|
|
253
|
+
(variable_declarator
|
|
254
|
+
name: (identifier) @type-binding.name
|
|
255
|
+
(invocation_expression
|
|
256
|
+
function: (member_access_expression
|
|
257
|
+
name: (identifier) @type-binding.type))))) @type-binding.alias
|
|
258
|
+
|
|
259
|
+
;; Type bindings — \`await\` propagation: \`var u = await Factory();\`.
|
|
260
|
+
;; Strip the await wrapper to get the underlying invocation; interpret
|
|
261
|
+
;; layer's stripGeneric handles Task<T> / ValueTask<T>.
|
|
262
|
+
(local_declaration_statement
|
|
263
|
+
(variable_declaration
|
|
264
|
+
type: (implicit_type)
|
|
265
|
+
(variable_declarator
|
|
266
|
+
name: (identifier) @type-binding.name
|
|
267
|
+
(await_expression
|
|
268
|
+
(invocation_expression
|
|
269
|
+
function: (identifier) @type-binding.type))))) @type-binding.alias
|
|
270
|
+
|
|
271
|
+
(local_declaration_statement
|
|
272
|
+
(variable_declaration
|
|
273
|
+
type: (implicit_type)
|
|
274
|
+
(variable_declarator
|
|
275
|
+
name: (identifier) @type-binding.name
|
|
276
|
+
(await_expression
|
|
277
|
+
(invocation_expression
|
|
278
|
+
function: (member_access_expression
|
|
279
|
+
name: (identifier) @type-binding.type)))))) @type-binding.alias
|
|
280
|
+
|
|
281
|
+
;; Type bindings — identifier-to-identifier assignment rebind:
|
|
282
|
+
;; \`alias = u;\` — aliases the rhs identifier's current type.
|
|
283
|
+
(assignment_expression
|
|
284
|
+
left: (identifier) @type-binding.name
|
|
285
|
+
right: (identifier) @type-binding.type) @type-binding.alias
|
|
286
|
+
|
|
287
|
+
;; Type bindings — method return type: \`public User GetUser() { ... }\`.
|
|
288
|
+
;; Anchor on the method_declaration so bindingScopeFor can hoist the
|
|
289
|
+
;; binding from function scope to the enclosing class/module scope
|
|
290
|
+
;; (callers, not the function body, look up the return type by the
|
|
291
|
+
;; function's name). Required for cross-file return-type propagation
|
|
292
|
+
;; via propagateImportedReturnTypes.
|
|
293
|
+
(method_declaration
|
|
294
|
+
returns: (identifier) @type-binding.type
|
|
295
|
+
name: (identifier) @type-binding.name) @type-binding.return
|
|
296
|
+
|
|
297
|
+
(method_declaration
|
|
298
|
+
returns: (generic_name) @type-binding.type
|
|
299
|
+
name: (identifier) @type-binding.name) @type-binding.return
|
|
300
|
+
|
|
301
|
+
(method_declaration
|
|
302
|
+
returns: (qualified_name) @type-binding.type
|
|
303
|
+
name: (identifier) @type-binding.name) @type-binding.return
|
|
304
|
+
|
|
305
|
+
(method_declaration
|
|
306
|
+
returns: (nullable_type) @type-binding.type
|
|
307
|
+
name: (identifier) @type-binding.name) @type-binding.return
|
|
308
|
+
|
|
309
|
+
;; Type bindings — field declaration: \`private City _city;\`. Attaches
|
|
310
|
+
;; to the enclosing class scope via positionIndex, so \`this._city.X\`
|
|
311
|
+
;; can look up _city's type on the class.
|
|
312
|
+
(field_declaration
|
|
313
|
+
(variable_declaration
|
|
314
|
+
type: (identifier) @type-binding.type
|
|
315
|
+
(variable_declarator
|
|
316
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
317
|
+
|
|
318
|
+
(field_declaration
|
|
319
|
+
(variable_declaration
|
|
320
|
+
type: (generic_name) @type-binding.type
|
|
321
|
+
(variable_declarator
|
|
322
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
323
|
+
|
|
324
|
+
(field_declaration
|
|
325
|
+
(variable_declaration
|
|
326
|
+
type: (qualified_name) @type-binding.type
|
|
327
|
+
(variable_declarator
|
|
328
|
+
name: (identifier) @type-binding.name))) @type-binding.annotation
|
|
329
|
+
|
|
330
|
+
;; Type bindings — property declaration: \`public User Owner { get; set; }\`.
|
|
331
|
+
(property_declaration
|
|
332
|
+
type: (identifier) @type-binding.type
|
|
333
|
+
name: (identifier) @type-binding.name) @type-binding.annotation
|
|
334
|
+
|
|
335
|
+
(property_declaration
|
|
336
|
+
type: (generic_name) @type-binding.type
|
|
337
|
+
name: (identifier) @type-binding.name) @type-binding.annotation
|
|
338
|
+
|
|
339
|
+
(property_declaration
|
|
340
|
+
type: (qualified_name) @type-binding.type
|
|
341
|
+
name: (identifier) @type-binding.name) @type-binding.annotation
|
|
342
|
+
|
|
343
|
+
(property_declaration
|
|
344
|
+
type: (nullable_type) @type-binding.type
|
|
345
|
+
name: (identifier) @type-binding.name) @type-binding.annotation
|
|
346
|
+
|
|
347
|
+
;; Type bindings — assignment rebind: \`alias = Factory();\` where
|
|
348
|
+
;; \`alias\` was previously declared. Same alias shape as \`var x = F();\`.
|
|
349
|
+
(assignment_expression
|
|
350
|
+
left: (identifier) @type-binding.name
|
|
351
|
+
right: (invocation_expression
|
|
352
|
+
function: (identifier) @type-binding.type)) @type-binding.alias
|
|
353
|
+
|
|
354
|
+
;; Type bindings — assignment with constructor: \`alias = new User();\`.
|
|
355
|
+
(assignment_expression
|
|
356
|
+
left: (identifier) @type-binding.name
|
|
357
|
+
right: (object_creation_expression
|
|
358
|
+
type: (identifier) @type-binding.type)) @type-binding.constructor
|
|
359
|
+
|
|
360
|
+
(assignment_expression
|
|
361
|
+
left: (identifier) @type-binding.name
|
|
362
|
+
right: (object_creation_expression
|
|
363
|
+
type: (generic_name) @type-binding.type)) @type-binding.constructor
|
|
364
|
+
|
|
365
|
+
;; Type bindings — \`is\` pattern: \`if (obj is User u) { u.Save(); }\`.
|
|
366
|
+
;; The declaration_pattern carries both the matched type and the
|
|
367
|
+
;; binding name; scope narrowing to the guarded branch is simplified
|
|
368
|
+
;; to function-scope (matches Python's match-case treatment) since we
|
|
369
|
+
;; don't emit @scope.block.
|
|
370
|
+
(is_pattern_expression
|
|
371
|
+
pattern: (declaration_pattern
|
|
372
|
+
type: (identifier) @type-binding.type
|
|
373
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
374
|
+
|
|
375
|
+
(is_pattern_expression
|
|
376
|
+
pattern: (declaration_pattern
|
|
377
|
+
type: (generic_name) @type-binding.type
|
|
378
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
379
|
+
|
|
380
|
+
(is_pattern_expression
|
|
381
|
+
pattern: (declaration_pattern
|
|
382
|
+
type: (qualified_name) @type-binding.type
|
|
383
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
384
|
+
|
|
385
|
+
;; Type bindings — \`case User u:\` inside a switch section.
|
|
386
|
+
;; tree-sitter-c-sharp's switch_section directly contains the
|
|
387
|
+
;; declaration_pattern / recursive_pattern (no case_pattern_switch_label
|
|
388
|
+
;; wrapper as in other C# grammars).
|
|
389
|
+
(switch_section
|
|
390
|
+
(declaration_pattern
|
|
391
|
+
type: (identifier) @type-binding.type
|
|
392
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
393
|
+
|
|
394
|
+
(switch_section
|
|
395
|
+
(declaration_pattern
|
|
396
|
+
type: (generic_name) @type-binding.type
|
|
397
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
398
|
+
|
|
399
|
+
;; Type bindings — recursive_pattern with named binding:
|
|
400
|
+
;; \`x is User { Age: 1 } u\` / \`case User { Age: 1 } u:\`. type + name
|
|
401
|
+
;; are named fields on recursive_pattern; inner property/positional
|
|
402
|
+
;; clauses don't affect the binding.
|
|
403
|
+
(is_pattern_expression
|
|
404
|
+
pattern: (recursive_pattern
|
|
405
|
+
type: (identifier) @type-binding.type
|
|
406
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
407
|
+
|
|
408
|
+
(switch_section
|
|
409
|
+
(recursive_pattern
|
|
410
|
+
type: (identifier) @type-binding.type
|
|
411
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
412
|
+
|
|
413
|
+
;; Type bindings — switch-expression arms: \`obj switch { User u => …, Repo { Name: "x" } r => … }\`.
|
|
414
|
+
;; Distinct from the \`switch_statement\` shape above — expression-switch
|
|
415
|
+
;; uses \`switch_expression_arm\` nodes.
|
|
416
|
+
(switch_expression_arm
|
|
417
|
+
(declaration_pattern
|
|
418
|
+
type: (identifier) @type-binding.type
|
|
419
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
420
|
+
|
|
421
|
+
(switch_expression_arm
|
|
422
|
+
(declaration_pattern
|
|
423
|
+
type: (generic_name) @type-binding.type
|
|
424
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
425
|
+
|
|
426
|
+
(switch_expression_arm
|
|
427
|
+
(recursive_pattern
|
|
428
|
+
type: (identifier) @type-binding.type
|
|
429
|
+
name: (identifier) @type-binding.name)) @type-binding.annotation
|
|
430
|
+
|
|
431
|
+
;; Type bindings — typed foreach: \`foreach (User u in xs)\`.
|
|
432
|
+
;; Shape parity with \`User u = …;\` — left binds to the declared type.
|
|
433
|
+
(foreach_statement
|
|
434
|
+
type: (identifier) @type-binding.type
|
|
435
|
+
left: (identifier) @type-binding.name) @type-binding.annotation
|
|
436
|
+
|
|
437
|
+
(foreach_statement
|
|
438
|
+
type: (generic_name) @type-binding.type
|
|
439
|
+
left: (identifier) @type-binding.name) @type-binding.annotation
|
|
440
|
+
|
|
441
|
+
(foreach_statement
|
|
442
|
+
type: (qualified_name) @type-binding.type
|
|
443
|
+
left: (identifier) @type-binding.name) @type-binding.annotation
|
|
444
|
+
|
|
445
|
+
(foreach_statement
|
|
446
|
+
type: (nullable_type) @type-binding.type
|
|
447
|
+
left: (identifier) @type-binding.name) @type-binding.annotation
|
|
448
|
+
|
|
449
|
+
;; Type bindings — \`var\` foreach: \`foreach (var u in xs)\`. Alias to
|
|
450
|
+
;; the iterable's identifier / chain so chain-follow unwraps
|
|
451
|
+
;; \`List<User>\` / \`Dictionary<K,V>.Values\` to the element type via
|
|
452
|
+
;; the generic-stripper in interpret.ts. Mirrors Python's for-loop
|
|
453
|
+
;; alias patterns.
|
|
454
|
+
(foreach_statement
|
|
455
|
+
type: (implicit_type)
|
|
456
|
+
left: (identifier) @type-binding.name
|
|
457
|
+
right: (identifier) @type-binding.type) @type-binding.alias
|
|
458
|
+
|
|
459
|
+
(foreach_statement
|
|
460
|
+
type: (implicit_type)
|
|
461
|
+
left: (identifier) @type-binding.name
|
|
462
|
+
right: (member_access_expression) @type-binding.type) @type-binding.alias
|
|
463
|
+
|
|
464
|
+
(foreach_statement
|
|
465
|
+
type: (implicit_type)
|
|
466
|
+
left: (identifier) @type-binding.name
|
|
467
|
+
right: (invocation_expression
|
|
468
|
+
function: (identifier) @type-binding.type)) @type-binding.alias
|
|
469
|
+
|
|
470
|
+
;; Return-type captures on method_declaration / property_declaration /
|
|
471
|
+
;; field_declaration are deferred — tree-sitter-c-sharp does not expose
|
|
472
|
+
;; the return/field type under a simple named field that pattern-matches
|
|
473
|
+
;; cleanly. When Unit 7's parity gate surfaces a gap requiring these
|
|
474
|
+
;; bindings, revisit with a positional pattern or a post-hoc lookup via
|
|
475
|
+
;; csharpMethodConfig.extractReturnType / csharpFieldConfig.extractType.
|
|
476
|
+
|
|
477
|
+
;; References — free calls: \`Foo()\`
|
|
478
|
+
(invocation_expression
|
|
479
|
+
function: (identifier) @reference.name) @reference.call.free
|
|
480
|
+
|
|
481
|
+
;; References — member calls: \`obj.Method()\`
|
|
482
|
+
;; \`(_)\` matches only named nodes in tree-sitter queries. \`this\` and
|
|
483
|
+
;; \`base\` are anonymous tokens in tree-sitter-c-sharp (unlike Python's
|
|
484
|
+
;; \`self\` which is a regular identifier), so they need explicit
|
|
485
|
+
;; patterns to emit a receiver capture.
|
|
486
|
+
(invocation_expression
|
|
487
|
+
function: (member_access_expression
|
|
488
|
+
expression: (_) @reference.receiver
|
|
489
|
+
name: (identifier) @reference.name)) @reference.call.member
|
|
490
|
+
|
|
491
|
+
(invocation_expression
|
|
492
|
+
function: (member_access_expression
|
|
493
|
+
expression: "this" @reference.receiver
|
|
494
|
+
name: (identifier) @reference.name)) @reference.call.member
|
|
495
|
+
|
|
496
|
+
(invocation_expression
|
|
497
|
+
function: (member_access_expression
|
|
498
|
+
expression: "base" @reference.receiver
|
|
499
|
+
name: (identifier) @reference.name)) @reference.call.member
|
|
500
|
+
|
|
501
|
+
;; References — null-conditional member calls: \`obj?.Method()\`
|
|
502
|
+
;; conditional_access_expression wraps a receiver followed by a
|
|
503
|
+
;; member_binding_expression. Capture the receiver explicitly so
|
|
504
|
+
;; receiver-bound resolution doesn't silently downgrade the call to
|
|
505
|
+
;; a free-call (which would misresolve to an imported \`Save\`).
|
|
506
|
+
;; tree-sitter-c-sharp doesn't expose named fields here, so use
|
|
507
|
+
;; positional wildcards.
|
|
508
|
+
(invocation_expression
|
|
509
|
+
function: (conditional_access_expression
|
|
510
|
+
(_) @reference.receiver
|
|
511
|
+
(member_binding_expression
|
|
512
|
+
(identifier) @reference.name))) @reference.call.member
|
|
513
|
+
|
|
514
|
+
;; References — constructor calls: \`new User(...)\`
|
|
515
|
+
(object_creation_expression
|
|
516
|
+
type: (identifier) @reference.name) @reference.call.constructor
|
|
517
|
+
|
|
518
|
+
(object_creation_expression
|
|
519
|
+
type: (generic_name
|
|
520
|
+
(identifier) @reference.name)) @reference.call.constructor
|
|
521
|
+
|
|
522
|
+
(object_creation_expression
|
|
523
|
+
type: (qualified_name) @reference.call.constructor.qualified) @reference.call.constructor
|
|
524
|
+
|
|
525
|
+
;; Alias-qualified constructor: \`new MyAlias::Foo()\`, \`new global::Foo()\`. The
|
|
526
|
+
;; top-level type is an alias_qualified_name (a \`global::Ns.Foo\` qualifier nests
|
|
527
|
+
;; under qualified_name instead, covered above). No @reference.name here —
|
|
528
|
+
;; captures.ts derives the simple-name tail via terminalTypeNameNode.
|
|
529
|
+
(object_creation_expression
|
|
530
|
+
type: (alias_qualified_name) @reference.call.constructor.qualified) @reference.call.constructor
|
|
531
|
+
|
|
532
|
+
;; References — field/property writes: \`obj.Name = "x"\` emits a write
|
|
533
|
+
;; ACCESSES edge from the enclosing method to the field/property on
|
|
534
|
+
;; obj's class.
|
|
535
|
+
(assignment_expression
|
|
536
|
+
left: (member_access_expression
|
|
537
|
+
expression: (_) @reference.receiver
|
|
538
|
+
name: (identifier) @reference.name)) @reference.write.member
|
|
539
|
+
|
|
540
|
+
(assignment_expression
|
|
541
|
+
left: (member_access_expression
|
|
542
|
+
expression: "this" @reference.receiver
|
|
543
|
+
name: (identifier) @reference.name)) @reference.write.member
|
|
544
|
+
|
|
545
|
+
(assignment_expression
|
|
546
|
+
left: (member_access_expression
|
|
547
|
+
expression: "base" @reference.receiver
|
|
548
|
+
name: (identifier) @reference.name)) @reference.write.member
|
|
549
|
+
|
|
550
|
+
;; References — field/property reads: \`obj.Name\`
|
|
551
|
+
;; Emit-side filtering drops call targets and assignment left-hand sides.
|
|
552
|
+
(member_access_expression
|
|
553
|
+
expression: (_) @reference.receiver
|
|
554
|
+
name: (identifier) @reference.name) @reference.read.member
|
|
555
|
+
`;
|
|
556
|
+
let _parser = null;
|
|
557
|
+
let _query = null;
|
|
558
|
+
function getCsharpParser() {
|
|
559
|
+
if (_parser === null) {
|
|
560
|
+
const grammar = loadCsharpGrammar();
|
|
561
|
+
if (grammar === null) {
|
|
562
|
+
throw new Error('tree-sitter-c-sharp grammar unavailable — install it (devDependency) or the language degrades to structure-layer capture.');
|
|
563
|
+
}
|
|
564
|
+
_parser = new tree_sitter_1.default();
|
|
565
|
+
_parser.setLanguage(grammar);
|
|
566
|
+
}
|
|
567
|
+
return _parser;
|
|
568
|
+
}
|
|
569
|
+
function getCsharpScopeQuery() {
|
|
570
|
+
if (_query === null) {
|
|
571
|
+
const grammar = loadCsharpGrammar();
|
|
572
|
+
if (grammar === null) {
|
|
573
|
+
throw new Error('tree-sitter-c-sharp grammar unavailable — install it (devDependency) or the language degrades to structure-layer capture.');
|
|
574
|
+
}
|
|
575
|
+
_query = new tree_sitter_1.default.Query(grammar, CSHARP_SCOPE_QUERY);
|
|
576
|
+
}
|
|
577
|
+
return _query;
|
|
578
|
+
}
|