@shapeshift-labs/frontier-lang-compiler 0.2.40 → 0.2.42
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 +100 -0
- package/bench/compile-suite.mjs +31 -0
- package/bench/native-adapters.mjs +32 -0
- package/bench/native-import-suite.mjs +79 -0
- package/bench/native-matrix-suite.mjs +64 -0
- package/bench/native-transform-suite.mjs +125 -0
- package/bench/smoke.mjs +80 -375
- package/bench/source-change-suite.mjs +111 -0
- package/dist/coverage-matrix-profiles.js +19 -0
- package/dist/declarations/adapter-coverage.d.ts +181 -0
- package/dist/declarations/compile.d.ts +110 -0
- package/dist/declarations/import-adapter-core.d.ts +233 -0
- package/dist/declarations/import-adapter-options-native.d.ts +185 -0
- package/dist/declarations/import-adapter-options-platform.d.ts +204 -0
- package/dist/declarations/language-adapter-package-contracts.d.ts +190 -0
- package/dist/declarations/native-diff.d.ts +240 -0
- package/dist/declarations/native-import-contracts.d.ts +211 -0
- package/dist/declarations/native-import-coverage.d.ts +107 -0
- package/dist/declarations/native-import-losses.d.ts +199 -0
- package/dist/declarations/native-parser-features.d.ts +227 -0
- package/dist/declarations/native-parser-formats.d.ts +132 -0
- package/dist/declarations/native-project-admission.d.ts +160 -0
- package/dist/declarations/native-project.d.ts +209 -0
- package/dist/declarations/projection-coverage.d.ts +146 -0
- package/dist/declarations/projection-readiness.d.ts +115 -0
- package/dist/declarations/roundtrip.d.ts +200 -0
- package/dist/declarations/runtime.d.ts +135 -0
- package/dist/declarations/semantic-history.d.ts +188 -0
- package/dist/declarations/semantic-merge-conflicts.d.ts +82 -0
- package/dist/declarations/semantic-patch-bundle.d.ts +210 -0
- package/dist/declarations/semantic-sidecar-admission.d.ts +61 -0
- package/dist/declarations/semantic-sidecar.d.ts +317 -0
- package/dist/declarations/semantic-slice.d.ts +228 -0
- package/dist/declarations/source-preservation.d.ts +126 -0
- package/dist/declarations/target-adapters.d.ts +138 -0
- package/dist/declarations/universal-capability.d.ts +148 -0
- package/dist/declarations/universal-dialects.d.ts +242 -0
- package/dist/index.d.ts +28 -2570
- package/dist/index.js +76 -16575
- package/dist/internal/index-impl/ExternalSemanticIndexFormats.js +8 -0
- package/dist/internal/index-impl/FrontierCompileTargets.js +7 -0
- package/dist/internal/index-impl/NativeImportFeatureEvidencePolicies.js +111 -0
- package/dist/internal/index-impl/NativeImportLossKinds.js +24 -0
- package/dist/internal/index-impl/NativeImportReadinessBySeverity.js +6 -0
- package/dist/internal/index-impl/NativeImportRoundtripReadinessStatuses.js +7 -0
- package/dist/internal/index-impl/NativeImportTaxonomyKinds.js +19 -0
- package/dist/internal/index-impl/adapterCoverageCapabilityRow.js +13 -0
- package/dist/internal/index-impl/adapterCoverageSnapshotFromSummary.js +13 -0
- package/dist/internal/index-impl/adapterCoverageSourcePreservation.js +6 -0
- package/dist/internal/index-impl/adapterDiagnosticToLoss.js +23 -0
- package/dist/internal/index-impl/adapterDiagnosticsEvidence.js +27 -0
- package/dist/internal/index-impl/addLspSemanticTokens.js +32 -0
- package/dist/internal/index-impl/addLspSymbol.js +44 -0
- package/dist/internal/index-impl/addSet.js +5 -0
- package/dist/internal/index-impl/attachExternalOwnership.js +79 -0
- package/dist/internal/index-impl/attachNativeChangeRegionProjectionMetadata.js +13 -0
- package/dist/internal/index-impl/attachNativeImportLossSummary.js +11 -0
- package/dist/internal/index-impl/canonicalTargets.js +7 -0
- package/dist/internal/index-impl/clangAstChildEntries.js +9 -0
- package/dist/internal/index-impl/clangAstDeclaration.js +44 -0
- package/dist/internal/index-impl/clangAstKind.js +7 -0
- package/dist/internal/index-impl/clangAstNodeValue.js +7 -0
- package/dist/internal/index-impl/clangAstRoot.js +14 -0
- package/dist/internal/index-impl/clangDeclarationAction.js +7 -0
- package/dist/internal/index-impl/clangDeclarationName.js +10 -0
- package/dist/internal/index-impl/clangIncludePath.js +8 -0
- package/dist/internal/index-impl/clangLiteralValue.js +6 -0
- package/dist/internal/index-impl/clangLocPosition.js +12 -0
- package/dist/internal/index-impl/clangLocationKind.js +8 -0
- package/dist/internal/index-impl/clangPreprocessorKind.js +3 -0
- package/dist/internal/index-impl/clangPreprocessorRecords.js +8 -0
- package/dist/internal/index-impl/clangTypeName.js +9 -0
- package/dist/internal/index-impl/classifyNativeImportReadiness.js +9 -0
- package/dist/internal/index-impl/classifyNativeImportRoundtripReadiness.js +129 -0
- package/dist/internal/index-impl/compileFrontierDocument.js +28 -0
- package/dist/internal/index-impl/compileFrontierSource.js +8 -0
- package/dist/internal/index-impl/compileNativeSource.js +186 -0
- package/dist/internal/index-impl/compileTargetLanguage.js +5 -0
- package/dist/internal/index-impl/coverageMatrixContext.js +20 -0
- package/dist/internal/index-impl/createAstNormalizationContext.js +14 -0
- package/dist/internal/index-impl/createBabelNativeImporterAdapter.js +18 -0
- package/dist/internal/index-impl/createCSharpRoslynNativeImporterAdapter.js +68 -0
- package/dist/internal/index-impl/createClangAstNativeImporterAdapter.js +59 -0
- package/dist/internal/index-impl/createEstreeNativeImporterAdapter.js +12 -0
- package/dist/internal/index-impl/createGoAstNativeImporterAdapter.js +63 -0
- package/dist/internal/index-impl/createJavaAstNativeImporterAdapter.js +66 -0
- package/dist/internal/index-impl/createKotlinPsiNativeImporterAdapter.js +73 -0
- package/dist/internal/index-impl/createLightweightNativeImport.js +154 -0
- package/dist/internal/index-impl/createNativeImportCoverageMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeImportFromCSharpRoslyn.js +39 -0
- package/dist/internal/index-impl/createNativeImportFromClangAst.js +36 -0
- package/dist/internal/index-impl/createNativeImportFromGoAst.js +35 -0
- package/dist/internal/index-impl/createNativeImportFromJavaAst.js +39 -0
- package/dist/internal/index-impl/createNativeImportFromKotlinPsi.js +47 -0
- package/dist/internal/index-impl/createNativeImportFromPythonAst.js +30 -0
- package/dist/internal/index-impl/createNativeImportFromRustSyn.js +30 -0
- package/dist/internal/index-impl/createNativeImportFromSwiftSyntax.js +37 -0
- package/dist/internal/index-impl/createNativeImportFromSyntaxAst.js +36 -0
- package/dist/internal/index-impl/createNativeImportFromTreeSitter.js +125 -0
- package/dist/internal/index-impl/createNativeImportFromTypeScriptAst.js +24 -0
- package/dist/internal/index-impl/createNativeImportResultContract.js +78 -0
- package/dist/internal/index-impl/createNativeParserAstFormatMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeParserFeatureMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeProjectImportResult.js +126 -0
- package/dist/internal/index-impl/createNativeRoundtripEvidence.js +117 -0
- package/dist/internal/index-impl/createNativeSourcePreservation.js +64 -0
- package/dist/internal/index-impl/createProjectImportAdmissionRecord.js +91 -0
- package/dist/internal/index-impl/createProjectionReadinessMatrix.js +5 -0
- package/dist/internal/index-impl/createProjectionTargetLossMatrix.js +5 -0
- package/dist/internal/index-impl/createPythonAstNativeImporterAdapter.js +52 -0
- package/dist/internal/index-impl/createRustSynNativeImporterAdapter.js +56 -0
- package/dist/internal/index-impl/createSemanticImportSidecar.js +105 -0
- package/dist/internal/index-impl/createSemanticImportSidecarAdmission.js +160 -0
- package/dist/internal/index-impl/createSemanticSlice.js +137 -0
- package/dist/internal/index-impl/createSwiftSyntaxNativeImporterAdapter.js +62 -0
- package/dist/internal/index-impl/createTreeSitterNativeImporterAdapter.js +58 -0
- package/dist/internal/index-impl/createTypeScriptCompilerNativeImporterAdapter.js +45 -0
- package/dist/internal/index-impl/createUniversalAstFromDocument.js +15 -0
- package/dist/internal/index-impl/createUniversalCapabilityMatrix.js +5 -0
- package/dist/internal/index-impl/csharpEvidenceSummary.js +18 -0
- package/dist/internal/index-impl/csharpGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/csharpGeneratedCodeMarker.js +16 -0
- package/dist/internal/index-impl/csharpGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/csharpRoslynChildEntries.js +18 -0
- package/dist/internal/index-impl/csharpRoslynChildWithParent.js +6 -0
- package/dist/internal/index-impl/csharpRoslynDeclarationName.js +11 -0
- package/dist/internal/index-impl/csharpRoslynDeclarations.js +53 -0
- package/dist/internal/index-impl/csharpRoslynDirectiveKind.js +3 -0
- package/dist/internal/index-impl/csharpRoslynHasBody.js +3 -0
- package/dist/internal/index-impl/csharpRoslynKind.js +11 -0
- package/dist/internal/index-impl/csharpRoslynLiteralValue.js +5 -0
- package/dist/internal/index-impl/csharpRoslynMethodLikeKind.js +7 -0
- package/dist/internal/index-impl/csharpRoslynModifierNames.js +16 -0
- package/dist/internal/index-impl/csharpRoslynName.js +13 -0
- package/dist/internal/index-impl/csharpRoslynNodeValue.js +7 -0
- package/dist/internal/index-impl/csharpRoslynOperatorName.js +8 -0
- package/dist/internal/index-impl/csharpRoslynPosition.js +27 -0
- package/dist/internal/index-impl/csharpRoslynPositionKind.js +6 -0
- package/dist/internal/index-impl/csharpRoslynProblemNode.js +14 -0
- package/dist/internal/index-impl/csharpRoslynRecoveredKind.js +5 -0
- package/dist/internal/index-impl/csharpRoslynRoot.js +15 -0
- package/dist/internal/index-impl/csharpRoslynTypeDeclarationKind.js +8 -0
- package/dist/internal/index-impl/csharpRoslynTypeDeclarationSymbolKind.js +5 -0
- package/dist/internal/index-impl/csharpRoslynTypeName.js +19 -0
- package/dist/internal/index-impl/csharpRoslynUsingPath.js +5 -0
- package/dist/internal/index-impl/csharpRoslynVariableNames.js +10 -0
- package/dist/internal/index-impl/declarationRecord.js +11 -0
- package/dist/internal/index-impl/declarationSemanticCoverage.js +10 -0
- package/dist/internal/index-impl/diffNativeOwnershipRegions.js +19 -0
- package/dist/internal/index-impl/diffNativeSourceImports.js +166 -0
- package/dist/internal/index-impl/diffNativeSources.js +25 -0
- package/dist/internal/index-impl/diffNativeSymbols.js +41 -0
- package/dist/internal/index-impl/effectiveAdapterExactness.js +6 -0
- package/dist/internal/index-impl/effectiveNativeImporterAdapterCoverage.js +21 -0
- package/dist/internal/index-impl/emitForTarget.js +4 -0
- package/dist/internal/index-impl/emitForTargetWithSourceMap.js +11 -0
- package/dist/internal/index-impl/ensureTrailingNewline.js +4 -0
- package/dist/internal/index-impl/expandSemanticSliceSelection.js +51 -0
- package/dist/internal/index-impl/externalDiagnosticFact.js +22 -0
- package/dist/internal/index-impl/externalDiagnosticLoss.js +20 -0
- package/dist/internal/index-impl/externalDiagnosticSeverity.js +7 -0
- package/dist/internal/index-impl/externalDocument.js +12 -0
- package/dist/internal/index-impl/externalFact.js +10 -0
- package/dist/internal/index-impl/externalLanguageNameByNumber.js +23 -0
- package/dist/internal/index-impl/externalOccurrence.js +13 -0
- package/dist/internal/index-impl/externalRelation.js +10 -0
- package/dist/internal/index-impl/externalRelationPredicateForOccurrence.js +8 -0
- package/dist/internal/index-impl/externalSemanticBase.js +15 -0
- package/dist/internal/index-impl/externalSemanticCoverageLoss.js +17 -0
- package/dist/internal/index-impl/externalSemanticEvidence.js +16 -0
- package/dist/internal/index-impl/externalSemanticSourceMapMappings.js +26 -0
- package/dist/internal/index-impl/externalSymbol.js +14 -0
- package/dist/internal/index-impl/externalSymbolKindByNumber.js +32 -0
- package/dist/internal/index-impl/fileLevelNativeChangeRegion.js +23 -0
- package/dist/internal/index-impl/findSemanticImportRegion.js +6 -0
- package/dist/internal/index-impl/freezeNativeImporterAdapterCoverageSnapshot.js +13 -0
- package/dist/internal/index-impl/getNativeImportFeatureEvidencePolicy.js +5 -0
- package/dist/internal/index-impl/getNativeParserAstFormatProfile.js +4 -0
- package/dist/internal/index-impl/goAstChildEntries.js +23 -0
- package/dist/internal/index-impl/goAstDeclarationName.js +9 -0
- package/dist/internal/index-impl/goAstDeclarations.js +30 -0
- package/dist/internal/index-impl/goAstIdentName.js +5 -0
- package/dist/internal/index-impl/goAstImportPath.js +7 -0
- package/dist/internal/index-impl/goAstKind.js +15 -0
- package/dist/internal/index-impl/goAstLiteralValue.js +5 -0
- package/dist/internal/index-impl/goAstNodeValue.js +7 -0
- package/dist/internal/index-impl/goAstPackageName.js +5 -0
- package/dist/internal/index-impl/goAstPosition.js +30 -0
- package/dist/internal/index-impl/goAstPositionKind.js +6 -0
- package/dist/internal/index-impl/goAstReceiverName.js +8 -0
- package/dist/internal/index-impl/goAstRoot.js +12 -0
- package/dist/internal/index-impl/goAstTokenName.js +6 -0
- package/dist/internal/index-impl/goAstTypeName.js +27 -0
- package/dist/internal/index-impl/goAstTypeSpecSymbolKind.js +8 -0
- package/dist/internal/index-impl/goAstValueSpecName.js +4 -0
- package/dist/internal/index-impl/goAstValueSpecNames.js +7 -0
- package/dist/internal/index-impl/goBadAstKind.js +3 -0
- package/dist/internal/index-impl/goGeneratedCodeMarker.js +7 -0
- package/dist/internal/index-impl/goReceiverFieldCount.js +4 -0
- package/dist/internal/index-impl/goTypeEvidenceSummary.js +9 -0
- package/dist/internal/index-impl/hasNativeExactAstEvidence.js +13 -0
- package/dist/internal/index-impl/hashNativeSpanText.js +6 -0
- package/dist/internal/index-impl/identifierName.js +9 -0
- package/dist/internal/index-impl/ignoredCSharpRoslynField.js +31 -0
- package/dist/internal/index-impl/ignoredClangAstField.js +19 -0
- package/dist/internal/index-impl/ignoredGoAstField.js +23 -0
- package/dist/internal/index-impl/ignoredJavaAstField.js +29 -0
- package/dist/internal/index-impl/ignoredKotlinPsiField.js +26 -0
- package/dist/internal/index-impl/ignoredPythonAstField.js +17 -0
- package/dist/internal/index-impl/ignoredRustSynField.js +11 -0
- package/dist/internal/index-impl/ignoredSwiftSyntaxField.js +27 -0
- package/dist/internal/index-impl/ignoredSyntaxField.js +15 -0
- package/dist/internal/index-impl/importExternalSemanticIndex.js +141 -0
- package/dist/internal/index-impl/importNativeProject.js +26 -0
- package/dist/internal/index-impl/importNativeSource.js +317 -0
- package/dist/internal/index-impl/inferExternalSemanticIndexFormat.js +46 -0
- package/dist/internal/index-impl/inferredAdapterCoverageNotes.js +8 -0
- package/dist/internal/index-impl/inferredAdapterExactness.js +5 -0
- package/dist/internal/index-impl/inferredSemanticCoverageLevel.js +5 -0
- package/dist/internal/index-impl/isCSharpRoslynNode.js +4 -0
- package/dist/internal/index-impl/isClangAstNode.js +4 -0
- package/dist/internal/index-impl/isGoAstNode.js +4 -0
- package/dist/internal/index-impl/isJavaAstNode.js +4 -0
- package/dist/internal/index-impl/isKotlinPsiNode.js +4 -0
- package/dist/internal/index-impl/isNativeSourceImportResult.js +3 -0
- package/dist/internal/index-impl/isPythonAstNode.js +4 -0
- package/dist/internal/index-impl/isRustSynAstNode.js +4 -0
- package/dist/internal/index-impl/isSwiftSyntaxNode.js +4 -0
- package/dist/internal/index-impl/isSyntaxAstNode.js +3 -0
- package/dist/internal/index-impl/javaAnnotationProcessingSummary.js +13 -0
- package/dist/internal/index-impl/javaAstChildEntries.js +18 -0
- package/dist/internal/index-impl/javaAstChildWithParent.js +6 -0
- package/dist/internal/index-impl/javaAstDeclarationName.js +11 -0
- package/dist/internal/index-impl/javaAstDeclarations.js +35 -0
- package/dist/internal/index-impl/javaAstFieldNames.js +7 -0
- package/dist/internal/index-impl/javaAstHasBody.js +3 -0
- package/dist/internal/index-impl/javaAstImportPath.js +8 -0
- package/dist/internal/index-impl/javaAstKind.js +12 -0
- package/dist/internal/index-impl/javaAstLiteralValue.js +5 -0
- package/dist/internal/index-impl/javaAstModifierNames.js +16 -0
- package/dist/internal/index-impl/javaAstName.js +14 -0
- package/dist/internal/index-impl/javaAstNodeValue.js +8 -0
- package/dist/internal/index-impl/javaAstPackageName.js +5 -0
- package/dist/internal/index-impl/javaAstPosition.js +32 -0
- package/dist/internal/index-impl/javaAstPositionKind.js +7 -0
- package/dist/internal/index-impl/javaAstRoot.js +14 -0
- package/dist/internal/index-impl/javaAstTypeName.js +22 -0
- package/dist/internal/index-impl/javaBindingEvidenceSummary.js +10 -0
- package/dist/internal/index-impl/javaGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/javaGeneratedCodeMarker.js +16 -0
- package/dist/internal/index-impl/javaLombokAnnotationMarker.js +6 -0
- package/dist/internal/index-impl/javaPathEvidenceSummary.js +14 -0
- package/dist/internal/index-impl/javaProblemNode.js +3 -0
- package/dist/internal/index-impl/javaRecoveredAstKind.js +4 -0
- package/dist/internal/index-impl/javaTypeDeclarationKind.js +7 -0
- package/dist/internal/index-impl/javaTypeDeclarationSymbolKind.js +5 -0
- package/dist/internal/index-impl/kotlinCompilerPluginAnnotationNode.js +5 -0
- package/dist/internal/index-impl/kotlinContractNode.js +3 -0
- package/dist/internal/index-impl/kotlinCoroutineNode.js +8 -0
- package/dist/internal/index-impl/kotlinEvidenceSummary.js +21 -0
- package/dist/internal/index-impl/kotlinExpectActualNode.js +5 -0
- package/dist/internal/index-impl/kotlinGeneratedCodeLoss.js +22 -0
- package/dist/internal/index-impl/kotlinGeneratedCodeMarker.js +6 -0
- package/dist/internal/index-impl/kotlinGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/kotlinPsiAnnotationNames.js +10 -0
- package/dist/internal/index-impl/kotlinPsiChildEntries.js +18 -0
- package/dist/internal/index-impl/kotlinPsiChildWithParent.js +6 -0
- package/dist/internal/index-impl/kotlinPsiDeclarationName.js +14 -0
- package/dist/internal/index-impl/kotlinPsiDeclarations.js +37 -0
- package/dist/internal/index-impl/kotlinPsiHasBody.js +3 -0
- package/dist/internal/index-impl/kotlinPsiImportPath.js +8 -0
- package/dist/internal/index-impl/kotlinPsiKind.js +13 -0
- package/dist/internal/index-impl/kotlinPsiModifiers.js +22 -0
- package/dist/internal/index-impl/kotlinPsiName.js +14 -0
- package/dist/internal/index-impl/kotlinPsiNodeValue.js +7 -0
- package/dist/internal/index-impl/kotlinPsiPackageName.js +8 -0
- package/dist/internal/index-impl/kotlinPsiPosition.js +27 -0
- package/dist/internal/index-impl/kotlinPsiPositionKind.js +6 -0
- package/dist/internal/index-impl/kotlinPsiProblemNode.js +10 -0
- package/dist/internal/index-impl/kotlinPsiRecoveredKind.js +5 -0
- package/dist/internal/index-impl/kotlinPsiRoot.js +15 -0
- package/dist/internal/index-impl/kotlinPsiTypeDeclarationKind.js +5 -0
- package/dist/internal/index-impl/kotlinPsiTypeDeclarationSymbolKind.js +8 -0
- package/dist/internal/index-impl/kotlinPsiTypeName.js +18 -0
- package/dist/internal/index-impl/kotlinPsiVariableNames.js +7 -0
- package/dist/internal/index-impl/kotlinScriptLoss.js +22 -0
- package/dist/internal/index-impl/kotlinUnsupportedSemanticLoss.js +23 -0
- package/dist/internal/index-impl/lineColumnForOffset.js +15 -0
- package/dist/internal/index-impl/literalSyntaxValue.js +4 -0
- package/dist/internal/index-impl/lossSeverityRank.js +6 -0
- package/dist/internal/index-impl/lspSymbolKindByNumber.js +19 -0
- package/dist/internal/index-impl/mapDiffSymbols.js +39 -0
- package/dist/internal/index-impl/matchingNativeTargetProjectionAdapter.js +4 -0
- package/dist/internal/index-impl/maxSemanticCoverageLevel.js +6 -0
- package/dist/internal/index-impl/mergeNativeLosses.js +12 -0
- package/dist/internal/index-impl/mergeSemanticIndexes.js +19 -0
- package/dist/internal/index-impl/mergeSemanticSliceSymbols.js +16 -0
- package/dist/internal/index-impl/missingInjectedParserResult.js +51 -0
- package/dist/internal/index-impl/nameFromExternalSymbol.js +10 -0
- package/dist/internal/index-impl/namedDeclaration.js +5 -0
- package/dist/internal/index-impl/nativeAstNodes.js +4 -0
- package/dist/internal/index-impl/nativeChangeMappingTouchesRegion.js +17 -0
- package/dist/internal/index-impl/nativeChangeProjectionEndpoint.js +28 -0
- package/dist/internal/index-impl/nativeChangeProjectionSourceMapLinks.js +33 -0
- package/dist/internal/index-impl/nativeChangeSpans.js +37 -0
- package/dist/internal/index-impl/nativeChangeSymbolTouchesRegion.js +10 -0
- package/dist/internal/index-impl/nativeChangeTouchedSymbol.js +21 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionAction.js +7 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionMetadata.js +49 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionSpanMetadata.js +12 -0
- package/dist/internal/index-impl/nativeCompileSourceLanguage.js +10 -0
- package/dist/internal/index-impl/nativeCompileTarget.js +10 -0
- package/dist/internal/index-impl/nativeDiffSymbolChanged.js +7 -0
- package/dist/internal/index-impl/nativeDiffSymbolKey.js +7 -0
- package/dist/internal/index-impl/nativeFeatureEvidenceRiskRank.js +6 -0
- package/dist/internal/index-impl/nativeImportCategoryForLossKind.js +16 -0
- package/dist/internal/index-impl/nativeImportEntries.js +4 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceHasKey.js +5 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceIds.js +10 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidencePolicy.js +14 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceReasons.js +8 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceValue.js +11 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceValuePresent.js +7 -0
- package/dist/internal/index-impl/nativeImportHasExactAstCoverage.js +5 -0
- package/dist/internal/index-impl/nativeImportProjectionContext.js +40 -0
- package/dist/internal/index-impl/nativeImportReadiness.js +6 -0
- package/dist/internal/index-impl/nativeImportReadinessReasons.js +16 -0
- package/dist/internal/index-impl/nativeImportRoundtripParser.js +10 -0
- package/dist/internal/index-impl/nativeImportRoundtripReasons.js +22 -0
- package/dist/internal/index-impl/nativeImportSourcePreservationRecord.js +6 -0
- package/dist/internal/index-impl/nativeImportSourceText.js +6 -0
- package/dist/internal/index-impl/nativeImporterAdapterCapabilityEvidence.js +59 -0
- package/dist/internal/index-impl/nativeImporterAdapterCoverage.js +12 -0
- package/dist/internal/index-impl/nativeJavaScriptImporterDeps.js +12 -0
- package/dist/internal/index-impl/nativeNodeId.js +8 -0
- package/dist/internal/index-impl/nativeProjectionDeclarationKind.js +12 -0
- package/dist/internal/index-impl/nativeProjectionDeclarations.js +48 -0
- package/dist/internal/index-impl/nativeProjectionImportOnlySymbol.js +5 -0
- package/dist/internal/index-impl/nativeProjectionKindForNode.js +12 -0
- package/dist/internal/index-impl/nativeProjectionLineComment.js +5 -0
- package/dist/internal/index-impl/nativeProjectionLoss.js +23 -0
- package/dist/internal/index-impl/nativeProjectionSourceCandidate.js +22 -0
- package/dist/internal/index-impl/nativeProjectionStubHeader.js +11 -0
- package/dist/internal/index-impl/nativeProjectionStubLosses.js +36 -0
- package/dist/internal/index-impl/nativeSourceChangeReasons.js +11 -0
- package/dist/internal/index-impl/nativeSourceChangeSummary.js +13 -0
- package/dist/internal/index-impl/nativeSourceCompileDeclarationGeneratedSpan.js +25 -0
- package/dist/internal/index-impl/nativeSourceCompileDeclarationMappings.js +31 -0
- package/dist/internal/index-impl/nativeSourceCompileEvidence.js +30 -0
- package/dist/internal/index-impl/nativeSourceCompileFileMapping.js +21 -0
- package/dist/internal/index-impl/nativeSourceCompileFullGeneratedSpan.js +16 -0
- package/dist/internal/index-impl/nativeSourceCompileGeneratedSpanForOffset.js +17 -0
- package/dist/internal/index-impl/nativeSourceCompileGeneratedSpanFromSource.js +13 -0
- package/dist/internal/index-impl/nativeSourceCompileMapTarget.js +6 -0
- package/dist/internal/index-impl/nativeSourceCompilePreservedMappings.js +51 -0
- package/dist/internal/index-impl/nativeSourceCompileSourceMaps.js +41 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetCoverage.js +21 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetExtension.js +10 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetLoss.js +32 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetLosses.js +43 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetPath.js +9 -0
- package/dist/internal/index-impl/nativeTargetProjectionAdapterEvidence.js +26 -0
- package/dist/internal/index-impl/nativeTargetProjectionAdapterMatches.js +16 -0
- package/dist/internal/index-impl/nativeTargetProjectionDiagnosticToLoss.js +22 -0
- package/dist/internal/index-impl/normalizeAdapterDiagnostics.js +28 -0
- package/dist/internal/index-impl/normalizeArray.js +4 -0
- package/dist/internal/index-impl/normalizeCSharpRoslynKind.js +38 -0
- package/dist/internal/index-impl/normalizeCompileTarget.js +9 -0
- package/dist/internal/index-impl/normalizeDiagnosticSeverity.js +6 -0
- package/dist/internal/index-impl/normalizeExternalOccurrenceRole.js +9 -0
- package/dist/internal/index-impl/normalizeExternalSemanticIndexFormat.js +34 -0
- package/dist/internal/index-impl/normalizeExternalSemanticIndexPayload.js +10 -0
- package/dist/internal/index-impl/normalizeExternalSemanticLanguage.js +7 -0
- package/dist/internal/index-impl/normalizeExternalSpan.js +21 -0
- package/dist/internal/index-impl/normalizeExternalSymbolKind.js +6 -0
- package/dist/internal/index-impl/normalizeFrontierSemanticIndexPayload.js +14 -0
- package/dist/internal/index-impl/normalizeGenericExternalSemanticIndexPayload.js +15 -0
- package/dist/internal/index-impl/normalizeGleanPayload.js +210 -0
- package/dist/internal/index-impl/normalizeGoAstKind.js +14 -0
- package/dist/internal/index-impl/normalizeJavaAstKind.js +24 -0
- package/dist/internal/index-impl/normalizeKotlinPsiKind.js +54 -0
- package/dist/internal/index-impl/normalizeLossSeverity.js +6 -0
- package/dist/internal/index-impl/normalizeLsifPayload.js +91 -0
- package/dist/internal/index-impl/normalizeLspDocuments.js +15 -0
- package/dist/internal/index-impl/normalizeLspPayload.js +33 -0
- package/dist/internal/index-impl/normalizeLspSymbolKind.js +5 -0
- package/dist/internal/index-impl/normalizeNativeDiffImport.js +15 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapter.js +33 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapterCoverage.js +38 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapterObservedCoverage.js +43 -0
- package/dist/internal/index-impl/normalizeNativeImporterSemanticCoverage.js +18 -0
- package/dist/internal/index-impl/normalizeNativeLossKind.js +8 -0
- package/dist/internal/index-impl/normalizeNativeLossRecord.js +20 -0
- package/dist/internal/index-impl/normalizeNativeLossRecords.js +6 -0
- package/dist/internal/index-impl/normalizeNativeTargetProjectionAdapter.js +37 -0
- package/dist/internal/index-impl/normalizeNativeTargetProjectionAdapterCoverage.js +20 -0
- package/dist/internal/index-impl/normalizeParserErrors.js +18 -0
- package/dist/internal/index-impl/normalizeRustSynKind.js +32 -0
- package/dist/internal/index-impl/normalizeScipPayload.js +98 -0
- package/dist/internal/index-impl/normalizeSemanticDbPayload.js +57 -0
- package/dist/internal/index-impl/normalizeSemanticSliceRef.js +4 -0
- package/dist/internal/index-impl/normalizeSwiftSyntaxKind.js +45 -0
- package/dist/internal/index-impl/normalizeSyntaxAstRoot.js +5 -0
- package/dist/internal/index-impl/numberOrUndefined.js +3 -0
- package/dist/internal/index-impl/observeNativeImporterAdapterCoverage.js +24 -0
- package/dist/internal/index-impl/observeNativeImporterAdapterCoverageDetails.js +66 -0
- package/dist/internal/index-impl/observeNativeImporterSemanticEvidence.js +23 -0
- package/dist/internal/index-impl/observedAdapterExactness.js +6 -0
- package/dist/internal/index-impl/oneLine.js +3 -0
- package/dist/internal/index-impl/parseCSharpRoslynSource.js +15 -0
- package/dist/internal/index-impl/parseClangAstSource.js +16 -0
- package/dist/internal/index-impl/parseGoAstSource.js +15 -0
- package/dist/internal/index-impl/parseJavaAstSource.js +16 -0
- package/dist/internal/index-impl/parseKotlinPsiSource.js +16 -0
- package/dist/internal/index-impl/parsePythonAstSource.js +16 -0
- package/dist/internal/index-impl/parseRustSynSource.js +13 -0
- package/dist/internal/index-impl/parseSwiftSyntaxSource.js +15 -0
- package/dist/internal/index-impl/parseTreeSitterSource.js +6 -0
- package/dist/internal/index-impl/primitiveCSharpRoslynFields.js +23 -0
- package/dist/internal/index-impl/primitiveClangAstFields.js +31 -0
- package/dist/internal/index-impl/primitiveGoAstFields.js +22 -0
- package/dist/internal/index-impl/primitiveJavaAstFields.js +22 -0
- package/dist/internal/index-impl/primitiveKotlinPsiFields.js +24 -0
- package/dist/internal/index-impl/primitivePythonAstFields.js +18 -0
- package/dist/internal/index-impl/primitiveRustSynFields.js +16 -0
- package/dist/internal/index-impl/primitiveSwiftSyntaxFields.js +21 -0
- package/dist/internal/index-impl/primitiveSyntaxFields.js +13 -0
- package/dist/internal/index-impl/primitiveTypeScriptFields.js +9 -0
- package/dist/internal/index-impl/projectFrontierAst.js +6 -0
- package/dist/internal/index-impl/projectImportAdmissionDecision.js +27 -0
- package/dist/internal/index-impl/projectImportAdmissionMergeScore.js +316 -0
- package/dist/internal/index-impl/projectImportAdmissionSummaries.js +252 -0
- package/dist/internal/index-impl/projectNativeImportToSource.js +90 -0
- package/dist/internal/index-impl/projectors.js +8 -0
- package/dist/internal/index-impl/pythonAliasName.js +5 -0
- package/dist/internal/index-impl/pythonAssignmentName.js +9 -0
- package/dist/internal/index-impl/pythonAstChildEntries.js +11 -0
- package/dist/internal/index-impl/pythonAstDeclaration.js +18 -0
- package/dist/internal/index-impl/pythonAstKind.js +3 -0
- package/dist/internal/index-impl/pythonAstLiteralValue.js +6 -0
- package/dist/internal/index-impl/pythonAstNodeValue.js +4 -0
- package/dist/internal/index-impl/pythonAstRoot.js +9 -0
- package/dist/internal/index-impl/pythonTargetName.js +12 -0
- package/dist/internal/index-impl/queryNativeParserFeatureMatrix.js +5 -0
- package/dist/internal/index-impl/queryProjectionReadinessMatrix.js +5 -0
- package/dist/internal/index-impl/readSemanticSliceJson.js +7 -0
- package/dist/internal/index-impl/readStringArray.js +5 -0
- package/dist/internal/index-impl/readUniversalAstJson.js +9 -0
- package/dist/internal/index-impl/relationPredicateForDeclaration.js +5 -0
- package/dist/internal/index-impl/renderCProjectionStubs.js +11 -0
- package/dist/internal/index-impl/renderGenericProjectionStubs.js +5 -0
- package/dist/internal/index-impl/renderJavaScriptProjectionStubs.js +12 -0
- package/dist/internal/index-impl/renderNativeProjectionStubs.js +13 -0
- package/dist/internal/index-impl/renderPythonProjectionStubs.js +10 -0
- package/dist/internal/index-impl/renderRustProjectionStubs.js +11 -0
- package/dist/internal/index-impl/renderTargetAst.js +6 -0
- package/dist/internal/index-impl/renderTargetAstWithSourceMap.js +6 -0
- package/dist/internal/index-impl/renderTypeScriptProjectionStubs.js +14 -0
- package/dist/internal/index-impl/renderers.js +8 -0
- package/dist/internal/index-impl/resolveCapabilityAdapters.js +29 -0
- package/dist/internal/index-impl/resolveNativeProjectAdapter.js +11 -0
- package/dist/internal/index-impl/resolveNativeTargetProjectionAdapter.js +14 -0
- package/dist/internal/index-impl/runNativeImporterAdapter.js +130 -0
- package/dist/internal/index-impl/runNativeTargetProjectionAdapter.js +115 -0
- package/dist/internal/index-impl/rustSynAstRoot.js +11 -0
- package/dist/internal/index-impl/rustSynChildEntries.js +10 -0
- package/dist/internal/index-impl/rustSynColumnToOneBased.js +3 -0
- package/dist/internal/index-impl/rustSynDeclaration.js +40 -0
- package/dist/internal/index-impl/rustSynIdentName.js +12 -0
- package/dist/internal/index-impl/rustSynImplName.js +11 -0
- package/dist/internal/index-impl/rustSynKind.js +15 -0
- package/dist/internal/index-impl/rustSynLiteralValue.js +5 -0
- package/dist/internal/index-impl/rustSynMacroKind.js +3 -0
- package/dist/internal/index-impl/rustSynNodeValue.js +6 -0
- package/dist/internal/index-impl/rustSynPathName.js +21 -0
- package/dist/internal/index-impl/rustSynPayload.js +6 -0
- package/dist/internal/index-impl/rustSynSpanKind.js +5 -0
- package/dist/internal/index-impl/rustSynUseName.js +26 -0
- package/dist/internal/index-impl/rustSynVisibility.js +9 -0
- package/dist/internal/index-impl/rustSynWrapperKind.js +12 -0
- package/dist/internal/index-impl/safeNativeImporterAdapterSummary.js +8 -0
- package/dist/internal/index-impl/safeNativeTargetProjectionAdapterSummary.js +8 -0
- package/dist/internal/index-impl/safeProjectionIdentifier.js +5 -0
- package/dist/internal/index-impl/scipOccurrenceRole.js +8 -0
- package/dist/internal/index-impl/scipOccurrenceRoleSet.js +12 -0
- package/dist/internal/index-impl/scipRelationshipRelations.js +20 -0
- package/dist/internal/index-impl/scipSymbolFacts.js +31 -0
- package/dist/internal/index-impl/scipSymbolId.js +8 -0
- package/dist/internal/index-impl/scipSyntaxKind.js +8 -0
- package/dist/internal/index-impl/selectSemanticSliceRecords.js +70 -0
- package/dist/internal/index-impl/semanticDbOccurrenceRole.js +5 -0
- package/dist/internal/index-impl/semanticDbSymbolFacts.js +15 -0
- package/dist/internal/index-impl/semanticDbSymbolId.js +7 -0
- package/dist/internal/index-impl/semanticHistoryRecords.js +233 -0
- package/dist/internal/index-impl/semanticIndexFromNativeDeclarations.js +127 -0
- package/dist/internal/index-impl/semanticMergeAdmissionForSeverity.js +5 -0
- package/dist/internal/index-impl/semanticMergeConflicts.js +116 -0
- package/dist/internal/index-impl/semanticPatchBundleRecords.js +240 -0
- package/dist/internal/index-impl/semanticPredicateMatches.js +4 -0
- package/dist/internal/index-impl/semanticSliceAssertion.js +8 -0
- package/dist/internal/index-impl/semanticSliceContext.js +24 -0
- package/dist/internal/index-impl/semanticSliceCurrentSource.js +4 -0
- package/dist/internal/index-impl/semanticSliceExpectedAssertions.js +8 -0
- package/dist/internal/index-impl/semanticSliceImportResult.js +30 -0
- package/dist/internal/index-impl/semanticSliceMappingMatchesRef.js +15 -0
- package/dist/internal/index-impl/semanticSliceMappingTouchesSets.js +7 -0
- package/dist/internal/index-impl/semanticSliceNativeNodeMatchesRef.js +12 -0
- package/dist/internal/index-impl/semanticSliceNativeParentMap.js +7 -0
- package/dist/internal/index-impl/semanticSliceReadiness.js +14 -0
- package/dist/internal/index-impl/semanticSliceReasons.js +11 -0
- package/dist/internal/index-impl/semanticSliceRecords.js +62 -0
- package/dist/internal/index-impl/semanticSliceRegionFromMapping.js +16 -0
- package/dist/internal/index-impl/semanticSliceRegionFromSymbol.js +21 -0
- package/dist/internal/index-impl/semanticSliceRegionMatchesRef.js +12 -0
- package/dist/internal/index-impl/semanticSliceRegionTouchesSets.js +6 -0
- package/dist/internal/index-impl/semanticSliceSourceFiles.js +35 -0
- package/dist/internal/index-impl/semanticSliceSourceHashAssertions.js +27 -0
- package/dist/internal/index-impl/semanticSliceSourceHashMap.js +18 -0
- package/dist/internal/index-impl/semanticSliceSourceMapLinks.js +21 -0
- package/dist/internal/index-impl/semanticSliceSourceSpans.js +9 -0
- package/dist/internal/index-impl/semanticSliceSourceTextMap.js +19 -0
- package/dist/internal/index-impl/semanticSliceSpanTouchesSelection.js +6 -0
- package/dist/internal/index-impl/semanticSliceSpansOverlap.js +15 -0
- package/dist/internal/index-impl/semanticSliceSymbolMatchesRef.js +13 -0
- package/dist/internal/index-impl/semanticSliceSymbolSpan.js +3 -0
- package/dist/internal/index-impl/semanticSliceSymbolTouchesSets.js +7 -0
- package/dist/internal/index-impl/semanticSliceTouchedSymbol.js +16 -0
- package/dist/internal/index-impl/semanticSliceValueMatches.js +6 -0
- package/dist/internal/index-impl/semanticTokenModifiers.js +7 -0
- package/dist/internal/index-impl/serializableDiagnostic.js +13 -0
- package/dist/internal/index-impl/serializableIncludeGraphSummary.js +10 -0
- package/dist/internal/index-impl/shortNodeText.js +6 -0
- package/dist/internal/index-impl/sourceMapRenderers.js +8 -0
- package/dist/internal/index-impl/sourcePreservationFromProjectionContext.js +5 -0
- package/dist/internal/index-impl/sourceSpanPathMatches.js +4 -0
- package/dist/internal/index-impl/sourceTextForSpan.js +12 -0
- package/dist/internal/index-impl/spanFromCSharpLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromCSharpLineSpan.js +18 -0
- package/dist/internal/index-impl/spanFromCSharpRoslynNode.js +19 -0
- package/dist/internal/index-impl/spanFromClangAstNode.js +17 -0
- package/dist/internal/index-impl/spanFromGoAstNode.js +14 -0
- package/dist/internal/index-impl/spanFromJavaAstNode.js +36 -0
- package/dist/internal/index-impl/spanFromJavaLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromJavaRange.js +22 -0
- package/dist/internal/index-impl/spanFromKotlinLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromKotlinPsiNode.js +19 -0
- package/dist/internal/index-impl/spanFromKotlinRange.js +18 -0
- package/dist/internal/index-impl/spanFromLoc.js +11 -0
- package/dist/internal/index-impl/spanFromLspRange.js +12 -0
- package/dist/internal/index-impl/spanFromPythonAstNode.js +15 -0
- package/dist/internal/index-impl/spanFromRustSynNode.js +20 -0
- package/dist/internal/index-impl/spanFromScipOccurrence.js +40 -0
- package/dist/internal/index-impl/spanFromSemanticDbRange.js +11 -0
- package/dist/internal/index-impl/spanFromSwiftLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromSwiftRange.js +18 -0
- package/dist/internal/index-impl/spanFromSwiftSyntaxNode.js +19 -0
- package/dist/internal/index-impl/spanFromTreeSitterNode.js +13 -0
- package/dist/internal/index-impl/spanFromTypeScriptNode.js +15 -0
- package/dist/internal/index-impl/stringFromTsExpression.js +7 -0
- package/dist/internal/index-impl/summarizeNativeChangedRegionProjections.js +16 -0
- package/dist/internal/index-impl/summarizeNativeImportFeatureEvidence.js +60 -0
- package/dist/internal/index-impl/summarizeNativeImportLosses.js +65 -0
- package/dist/internal/index-impl/summarizeProjectSourcePreservation.js +15 -0
- package/dist/internal/index-impl/swiftEvidenceSummary.js +19 -0
- package/dist/internal/index-impl/swiftGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/swiftGeneratedCodeMarker.js +11 -0
- package/dist/internal/index-impl/swiftGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxAttributeNames.js +10 -0
- package/dist/internal/index-impl/swiftSyntaxChildEntries.js +18 -0
- package/dist/internal/index-impl/swiftSyntaxChildWithParent.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxConditionalCompilationKind.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxDeclarationName.js +19 -0
- package/dist/internal/index-impl/swiftSyntaxDeclarations.js +38 -0
- package/dist/internal/index-impl/swiftSyntaxEnumCaseNames.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxFunctionLikeKind.js +8 -0
- package/dist/internal/index-impl/swiftSyntaxHasBody.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxImportPath.js +14 -0
- package/dist/internal/index-impl/swiftSyntaxKind.js +11 -0
- package/dist/internal/index-impl/swiftSyntaxLiteralValue.js +5 -0
- package/dist/internal/index-impl/swiftSyntaxMacroKind.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxModifierNames.js +16 -0
- package/dist/internal/index-impl/swiftSyntaxName.js +14 -0
- package/dist/internal/index-impl/swiftSyntaxNodeValue.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxOperatorName.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxPatternName.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxPosition.js +27 -0
- package/dist/internal/index-impl/swiftSyntaxPositionKind.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxProblemNode.js +13 -0
- package/dist/internal/index-impl/swiftSyntaxRecoveredKind.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxRoot.js +15 -0
- package/dist/internal/index-impl/swiftSyntaxTypeDeclarationKind.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxTypeDeclarationSymbolKind.js +8 -0
- package/dist/internal/index-impl/swiftSyntaxTypeName.js +19 -0
- package/dist/internal/index-impl/swiftSyntaxVariableNames.js +7 -0
- package/dist/internal/index-impl/syntaxDeclaration.js +18 -0
- package/dist/internal/index-impl/testSemanticSlice.js +43 -0
- package/dist/internal/index-impl/treeSitterDeclaration.js +24 -0
- package/dist/internal/index-impl/treeSitterFieldText.js +5 -0
- package/dist/internal/index-impl/truncatedAstLoss.js +16 -0
- package/dist/internal/index-impl/typeScriptDeclaration.js +14 -0
- package/dist/internal/index-impl/typeScriptKindName.js +6 -0
- package/dist/internal/index-impl/typeScriptNodeValue.js +4 -0
- package/dist/internal/index-impl/uniqueNativeProjectionDeclarations.js +9 -0
- package/dist/internal/index-impl/uniqueSemanticSliceNativeNodes.js +11 -0
- package/dist/internal/index-impl/uniqueSemanticSliceRegions.js +15 -0
- package/dist/internal/index-impl/uniqueSemanticSliceSpans.js +21 -0
- package/dist/internal/index-impl/unverifiedNativeAstLosses.js +16 -0
- package/dist/internal/index-impl/uriToPath.js +11 -0
- package/dist/internal/index-impl/visitCSharpRoslynNode.js +87 -0
- package/dist/internal/index-impl/visitClangAstNode.js +62 -0
- package/dist/internal/index-impl/visitGoAstNode.js +99 -0
- package/dist/internal/index-impl/visitJavaAstNode.js +73 -0
- package/dist/internal/index-impl/visitKotlinPsiNode.js +108 -0
- package/dist/internal/index-impl/visitPythonAstNode.js +47 -0
- package/dist/internal/index-impl/visitRustSynNode.js +62 -0
- package/dist/internal/index-impl/visitSwiftSyntaxNode.js +103 -0
- package/dist/internal/index-impl/visitSyntaxAstNode.js +46 -0
- package/dist/internal/index-impl/visitTreeSitterNode.js +145 -0
- package/dist/internal/index-impl/visitTypeScriptAstNode.js +45 -0
- package/dist/internal/index-impl/withExternalEmptyLoss.js +32 -0
- package/dist/internal/index-impl/withNativeImportReadiness.js +53 -0
- package/dist/internal/index-impl/writeSemanticSliceJson.js +7 -0
- package/dist/internal/index-impl/writeUniversalAstJson.js +8 -0
- package/dist/language-adapter-package-contracts.js +289 -0
- package/dist/native-import-coverage-matrix.js +237 -0
- package/dist/native-import-language-profiles.js +169 -0
- package/dist/native-import-utils.js +143 -0
- package/dist/native-js-ts-importers.js +85 -0
- package/dist/native-parser-ast-format-matrix.js +147 -0
- package/dist/native-parser-ast-format-profiles.js +271 -0
- package/dist/native-parser-feature-assessment.js +118 -0
- package/dist/native-parser-feature-coverage.js +268 -0
- package/dist/native-parser-feature-matrix.js +92 -0
- package/dist/native-parser-feature-rows.js +219 -0
- package/dist/native-region-scanner-core.js +179 -0
- package/dist/native-region-scanner-dynamic.js +259 -0
- package/dist/native-region-scanner-functional.js +191 -0
- package/dist/native-region-scanner-js.js +310 -0
- package/dist/native-region-scanner-main.js +301 -0
- package/dist/native-region-scanner.js +62 -0
- package/dist/native-source-maps.js +260 -0
- package/dist/native-source-preservation-scanner.js +266 -0
- package/dist/native-source-preservation-types.d.ts +77 -0
- package/dist/projection-readiness-helpers.js +166 -0
- package/dist/projection-readiness-matrix.js +122 -0
- package/dist/projection-target-loss-matrix.js +318 -0
- package/dist/semantic-import-contract-summary.js +188 -0
- package/dist/semantic-import-layers.js +320 -0
- package/dist/semantic-import-regions.js +181 -0
- package/dist/semantic-import-sidecar-admission-types.d.ts +61 -0
- package/dist/semantic-import-sidecar-entry.js +78 -0
- package/dist/semantic-import-sidecar-types.d.ts +275 -0
- package/dist/semantic-import-source-preservation.js +198 -0
- package/dist/universal-capability-matrix.js +280 -0
- package/dist/universal-dialect-layer.js +74 -0
- package/dist/universal-dialect-registry.js +204 -0
- package/dist/universal-dialect-utils.js +110 -0
- package/package.json +9 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{nativeImportEntries}from'./nativeImportEntries.js';import{nativeImportSourceText}from'./nativeImportSourceText.js';
|
|
2
|
+
export function semanticSliceSourceTextMap(imported, universalAst, value, options) {
|
|
3
|
+
const entries = new Map();
|
|
4
|
+
const add = (path, sourceText) => {
|
|
5
|
+
if (typeof sourceText !== 'string') return;
|
|
6
|
+
entries.set(path ?? '', sourceText);
|
|
7
|
+
};
|
|
8
|
+
add(options.sourcePath, options.sourceText);
|
|
9
|
+
add(value?.sourcePath, value?.sourceText);
|
|
10
|
+
for (const item of [imported, ...(imported ? nativeImportEntries(imported) : [])]) {
|
|
11
|
+
add(item?.sourcePath, nativeImportSourceText(item));
|
|
12
|
+
add(item?.nativeSource?.sourcePath, item?.nativeSource?.metadata?.sourcePreservation?.sourceText);
|
|
13
|
+
}
|
|
14
|
+
for (const nativeSource of universalAst?.nativeSources ?? []) {
|
|
15
|
+
add(nativeSource?.sourcePath, nativeSource?.metadata?.sourcePreservation?.sourceText);
|
|
16
|
+
add(nativeSource?.sourcePath, nativeSource?.ast?.metadata?.sourcePreservation?.sourceText);
|
|
17
|
+
}
|
|
18
|
+
return entries;
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{semanticSliceSpansOverlap}from'./semanticSliceSpansOverlap.js';
|
|
2
|
+
export function semanticSliceSpanTouchesSelection(span, mappings, regions) {
|
|
3
|
+
if (!span) return false;
|
|
4
|
+
return mappings.some((mapping) => mapping.sourceSpan === span || semanticSliceSpansOverlap(mapping.sourceSpan, span))
|
|
5
|
+
|| regions.some((region) => semanticSliceSpansOverlap(region.sourceSpan, span));
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function semanticSliceSpansOverlap(left, right) {
|
|
2
|
+
if (!left || !right) return false;
|
|
3
|
+
const leftPath = left.path ?? left.sourceId;
|
|
4
|
+
const rightPath = right.path ?? right.sourceId;
|
|
5
|
+
if (leftPath && rightPath && leftPath !== rightPath) return false;
|
|
6
|
+
if (typeof left.start === 'number' && typeof left.end === 'number' && typeof right.start === 'number' && typeof right.end === 'number') {
|
|
7
|
+
return left.start <= right.end && right.start <= left.end;
|
|
8
|
+
}
|
|
9
|
+
if (typeof left.startLine === 'number' && typeof right.startLine === 'number') {
|
|
10
|
+
const leftEnd = left.endLine ?? left.startLine;
|
|
11
|
+
const rightEnd = right.endLine ?? right.startLine;
|
|
12
|
+
return left.startLine <= rightEnd && right.startLine <= leftEnd;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{normalizeSemanticSliceRef}from'./normalizeSemanticSliceRef.js';import{semanticSliceValueMatches}from'./semanticSliceValueMatches.js';
|
|
2
|
+
export function semanticSliceSymbolMatchesRef(symbol, ref) {
|
|
3
|
+
const normalized = normalizeSemanticSliceRef(ref, 'symbol');
|
|
4
|
+
return [
|
|
5
|
+
symbol.id,
|
|
6
|
+
symbol.name,
|
|
7
|
+
symbol.displayName,
|
|
8
|
+
symbol.signature,
|
|
9
|
+
symbol.nativeAstNodeId,
|
|
10
|
+
symbol.metadata?.ownershipRegionId,
|
|
11
|
+
symbol.metadata?.ownershipRegionKey
|
|
12
|
+
].filter(Boolean).some((value) => semanticSliceValueMatches(value, normalized));
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function semanticSliceSymbolTouchesSets(symbol, selection) {
|
|
2
|
+
return selection.selectedSymbols.has(symbol.id)
|
|
3
|
+
|| selection.selectedNativeNodes.has(symbol.nativeAstNodeId)
|
|
4
|
+
|| selection.selectedRegions.has(symbol.ownershipRegionId)
|
|
5
|
+
|| selection.selectedRegions.has(symbol.metadata?.ownershipRegionId)
|
|
6
|
+
|| selection.selectedRegions.has(symbol.metadata?.ownershipRegionKey);
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{semanticSliceSymbolSpan}from'./semanticSliceSymbolSpan.js';
|
|
2
|
+
export function semanticSliceTouchedSymbol(symbol) {
|
|
3
|
+
return {
|
|
4
|
+
id: symbol.id,
|
|
5
|
+
name: symbol.name,
|
|
6
|
+
kind: symbol.kind,
|
|
7
|
+
nativeAstNodeId: symbol.nativeAstNodeId,
|
|
8
|
+
span: semanticSliceSymbolSpan(symbol),
|
|
9
|
+
conflictKey: symbol.metadata?.ownershipRegionKey ? `region:${symbol.metadata.ownershipRegionKey}` : `symbol:${symbol.id}`,
|
|
10
|
+
metadata: {
|
|
11
|
+
ownershipRegionId: symbol.ownershipRegionId ?? symbol.metadata?.ownershipRegionId,
|
|
12
|
+
ownershipRegionKind: symbol.ownershipRegionKind ?? symbol.metadata?.ownershipRegionKind,
|
|
13
|
+
signatureHash: symbol.signatureHash
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function serializableDiagnostic(diagnostic) {
|
|
2
|
+
return {
|
|
3
|
+
id: diagnostic.id,
|
|
4
|
+
severity: diagnostic.severity,
|
|
5
|
+
code: diagnostic.code,
|
|
6
|
+
phase: diagnostic.phase,
|
|
7
|
+
kind: diagnostic.kind,
|
|
8
|
+
message: diagnostic.message,
|
|
9
|
+
path: diagnostic.path,
|
|
10
|
+
span: diagnostic.span,
|
|
11
|
+
metadata: diagnostic.metadata
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function serializableIncludeGraphSummary(value) {
|
|
2
|
+
if (!value || typeof value !== 'object') return undefined;
|
|
3
|
+
if (Array.isArray(value)) return { edgeCount: value.length };
|
|
4
|
+
const summary = {};
|
|
5
|
+
if (typeof value.hash === 'string') summary.hash = value.hash;
|
|
6
|
+
if (typeof value.root === 'string') summary.root = value.root;
|
|
7
|
+
if (Array.isArray(value.edges)) summary.edgeCount = value.edges.length;
|
|
8
|
+
if (Array.isArray(value.includes)) summary.includeCount = value.includes.length;
|
|
9
|
+
return Object.keys(summary).length ? summary : { present: true };
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{renderCAstWithSourceMap}from'@shapeshift-labs/frontier-lang-c';import{renderJavaScriptAstWithSourceMap}from'@shapeshift-labs/frontier-lang-javascript';import{renderPythonAstWithSourceMap}from'@shapeshift-labs/frontier-lang-python';import{renderRustAstWithSourceMap}from'@shapeshift-labs/frontier-lang-rust';import{renderTypeScriptAstWithSourceMap}from'@shapeshift-labs/frontier-lang-typescript';
|
|
2
|
+
export const sourceMapRenderers = Object.freeze({
|
|
3
|
+
typescript: renderTypeScriptAstWithSourceMap,
|
|
4
|
+
javascript: renderJavaScriptAstWithSourceMap,
|
|
5
|
+
rust: renderRustAstWithSourceMap,
|
|
6
|
+
python: renderPythonAstWithSourceMap,
|
|
7
|
+
c: renderCAstWithSourceMap
|
|
8
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function sourceTextForSpan(sourceText, span) {
|
|
2
|
+
if (typeof sourceText !== 'string' || !span) return undefined;
|
|
3
|
+
if (typeof span.start === 'number' && typeof span.end === 'number' && span.end >= span.start) {
|
|
4
|
+
return sourceText.slice(span.start, span.end);
|
|
5
|
+
}
|
|
6
|
+
if (typeof span.startLine === 'number') {
|
|
7
|
+
const lines = sourceText.split(/\r?\n/);
|
|
8
|
+
const endLine = typeof span.endLine === 'number' && span.endLine >= span.startLine ? span.endLine : span.startLine;
|
|
9
|
+
return lines.slice(span.startLine - 1, endLine).join('\n');
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function spanFromCSharpLineFields(node, input) {
|
|
2
|
+
const startLine = node.startLine ?? node.line ?? node.beginLine;
|
|
3
|
+
if (typeof startLine !== 'number') return undefined;
|
|
4
|
+
return {
|
|
5
|
+
sourceId: input.sourceHash,
|
|
6
|
+
path: node.path ?? node.filePath ?? node.file ?? input.sourcePath,
|
|
7
|
+
startLine,
|
|
8
|
+
startColumn: node.startColumn ?? node.column ?? node.beginColumn,
|
|
9
|
+
endLine: node.endLine,
|
|
10
|
+
endColumn: node.endColumn
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function spanFromCSharpLineSpan(lineSpan, input) {
|
|
2
|
+
if (!lineSpan || typeof lineSpan !== 'object') return undefined;
|
|
3
|
+
const start = lineSpan.startLinePosition ?? lineSpan.StartLinePosition ?? lineSpan.start ?? lineSpan.Start;
|
|
4
|
+
const end = lineSpan.endLinePosition ?? lineSpan.EndLinePosition ?? lineSpan.end ?? lineSpan.End;
|
|
5
|
+
const line = start?.line ?? start?.Line;
|
|
6
|
+
if (typeof line !== 'number') return undefined;
|
|
7
|
+
const character = start.character ?? start.Character ?? start.column ?? start.Column;
|
|
8
|
+
const endLine = end?.line ?? end?.Line;
|
|
9
|
+
const endCharacter = end?.character ?? end?.Character ?? end?.column ?? end?.Column;
|
|
10
|
+
return {
|
|
11
|
+
sourceId: input.sourceHash,
|
|
12
|
+
path: lineSpan.path ?? lineSpan.filePath ?? lineSpan.FilePath ?? input.sourcePath,
|
|
13
|
+
startLine: line + 1,
|
|
14
|
+
startColumn: typeof character === 'number' ? character + 1 : undefined,
|
|
15
|
+
endLine: typeof endLine === 'number' ? endLine + 1 : undefined,
|
|
16
|
+
endColumn: typeof endCharacter === 'number' ? endCharacter + 1 : undefined
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{csharpRoslynPosition}from'./csharpRoslynPosition.js';import{spanFromCSharpLineFields}from'./spanFromCSharpLineFields.js';import{spanFromCSharpLineSpan}from'./spanFromCSharpLineSpan.js';
|
|
2
|
+
export function spanFromCSharpRoslynNode(node, input, options = {}) {
|
|
3
|
+
const lineSpan = node.lineSpan ?? node.location?.lineSpan ?? node.location?.LineSpan ?? node.FileLinePositionSpan;
|
|
4
|
+
const fromLineSpan = spanFromCSharpLineSpan(lineSpan, input);
|
|
5
|
+
if (fromLineSpan) return fromLineSpan;
|
|
6
|
+
const direct = spanFromCSharpLineFields(node, input);
|
|
7
|
+
if (direct) return direct;
|
|
8
|
+
const start = csharpRoslynPosition(node.start ?? node.Start ?? node.span?.start ?? node.Span?.Start ?? node.position, options);
|
|
9
|
+
const end = csharpRoslynPosition(node.end ?? node.End ?? node.span?.end ?? node.Span?.End, options);
|
|
10
|
+
if (!start) return undefined;
|
|
11
|
+
return {
|
|
12
|
+
sourceId: input.sourceHash,
|
|
13
|
+
path: start.path ?? end?.path ?? input.sourcePath,
|
|
14
|
+
startLine: start.line,
|
|
15
|
+
startColumn: start.column,
|
|
16
|
+
endLine: end?.line,
|
|
17
|
+
endColumn: end?.column
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{clangLocPosition}from'./clangLocPosition.js';
|
|
2
|
+
export function spanFromClangAstNode(node, input) {
|
|
3
|
+
const range = node.range ?? {};
|
|
4
|
+
const begin = range.begin ?? node.loc ?? node.spellingLoc ?? node.expansionLoc;
|
|
5
|
+
const end = range.end ?? node.end;
|
|
6
|
+
const start = clangLocPosition(begin);
|
|
7
|
+
if (!start) return undefined;
|
|
8
|
+
const finish = clangLocPosition(end);
|
|
9
|
+
return {
|
|
10
|
+
sourceId: input.sourceHash,
|
|
11
|
+
path: start.path ?? finish?.path ?? input.sourcePath,
|
|
12
|
+
startLine: start.line,
|
|
13
|
+
startColumn: start.column,
|
|
14
|
+
endLine: finish?.line,
|
|
15
|
+
endColumn: finish?.column
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{goAstPosition}from'./goAstPosition.js';
|
|
2
|
+
export function spanFromGoAstNode(node, input, options = {}) {
|
|
3
|
+
const start = goAstPosition(node.Pos ?? node.pos ?? node.Name?.NamePos ?? node.name?.namePos ?? node.Package, options);
|
|
4
|
+
const end = goAstPosition(node.End ?? node.end ?? node.EndPos ?? node.endPos, options);
|
|
5
|
+
if (!start) return undefined;
|
|
6
|
+
return {
|
|
7
|
+
sourceId: input.sourceHash,
|
|
8
|
+
path: start.path ?? end?.path ?? input.sourcePath,
|
|
9
|
+
startLine: start.line,
|
|
10
|
+
startColumn: start.column,
|
|
11
|
+
endLine: end?.line,
|
|
12
|
+
endColumn: end?.column
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{javaAstPosition}from'./javaAstPosition.js';import{spanFromJavaLineFields}from'./spanFromJavaLineFields.js';import{spanFromJavaRange}from'./spanFromJavaRange.js';
|
|
2
|
+
export function spanFromJavaAstNode(node, input, options = {}) {
|
|
3
|
+
const direct = spanFromJavaRange(node.range ?? node.loc ?? node.location, input)
|
|
4
|
+
?? spanFromJavaLineFields(node, input);
|
|
5
|
+
if (direct) return direct;
|
|
6
|
+
const start = javaAstPosition(
|
|
7
|
+
node.begin ?? node.start ?? node.pos ?? node.position ?? node.startPosition ?? node.name?.range?.begin ?? node.name?.loc?.start,
|
|
8
|
+
options
|
|
9
|
+
);
|
|
10
|
+
const end = javaAstPosition(
|
|
11
|
+
node.end ?? node.endPosition ?? node.stopPosition ?? node.finishPosition ?? node.name?.range?.end ?? node.name?.loc?.end,
|
|
12
|
+
options
|
|
13
|
+
);
|
|
14
|
+
const sourceRange = node.sourceRange ?? node.rangeInfo;
|
|
15
|
+
const sourceStart = javaAstPosition(
|
|
16
|
+
sourceRange?.start ?? sourceRange?.offset ?? sourceRange?.startPosition,
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
const sourceEnd = javaAstPosition(
|
|
20
|
+
typeof sourceRange?.offset === 'number' && typeof sourceRange?.length === 'number'
|
|
21
|
+
? sourceRange.offset + sourceRange.length
|
|
22
|
+
: sourceRange?.end ?? sourceRange?.endPosition,
|
|
23
|
+
options
|
|
24
|
+
);
|
|
25
|
+
const resolvedStart = start ?? sourceStart;
|
|
26
|
+
const resolvedEnd = end ?? sourceEnd;
|
|
27
|
+
if (!resolvedStart) return undefined;
|
|
28
|
+
return {
|
|
29
|
+
sourceId: input.sourceHash,
|
|
30
|
+
path: resolvedStart.path ?? resolvedEnd?.path ?? input.sourcePath,
|
|
31
|
+
startLine: resolvedStart.line,
|
|
32
|
+
startColumn: resolvedStart.column,
|
|
33
|
+
endLine: resolvedEnd?.line,
|
|
34
|
+
endColumn: resolvedEnd?.column
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function spanFromJavaLineFields(node, input) {
|
|
2
|
+
const startLine = node.startLine ?? node.line ?? node.beginLine ?? node.lineno;
|
|
3
|
+
if (typeof startLine !== 'number') return undefined;
|
|
4
|
+
return {
|
|
5
|
+
sourceId: input.sourceHash,
|
|
6
|
+
path: node.path ?? node.file ?? node.filename ?? input.sourcePath,
|
|
7
|
+
startLine,
|
|
8
|
+
startColumn: node.startColumn ?? node.column ?? node.beginColumn ?? node.col,
|
|
9
|
+
endLine: node.endLine ?? node.end_lineno,
|
|
10
|
+
endColumn: node.endColumn ?? node.end_col_offset
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function spanFromJavaRange(range, input) {
|
|
2
|
+
if (!range || typeof range !== 'object') return undefined;
|
|
3
|
+
const start = range.begin ?? range.start;
|
|
4
|
+
const end = range.end ?? range.stop;
|
|
5
|
+
if (start && typeof start === 'object') {
|
|
6
|
+
const startLine = start.line ?? start.Line;
|
|
7
|
+
const startColumn = start.column ?? start.col ?? start.Column ?? start.character;
|
|
8
|
+
const endLine = end?.line ?? end?.Line;
|
|
9
|
+
const endColumn = end?.column ?? end?.col ?? end?.Column ?? end?.character;
|
|
10
|
+
if (typeof startLine === 'number') {
|
|
11
|
+
return {
|
|
12
|
+
sourceId: input.sourceHash,
|
|
13
|
+
path: start.path ?? start.file ?? end?.path ?? end?.file ?? input.sourcePath,
|
|
14
|
+
startLine,
|
|
15
|
+
startColumn,
|
|
16
|
+
endLine,
|
|
17
|
+
endColumn
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function spanFromKotlinLineFields(node, input) {
|
|
2
|
+
const startLine = node.startLine ?? node.line ?? node.beginLine;
|
|
3
|
+
if (typeof startLine !== 'number') return undefined;
|
|
4
|
+
return {
|
|
5
|
+
sourceId: input.sourceHash,
|
|
6
|
+
path: node.path ?? node.filePath ?? node.file ?? input.sourcePath,
|
|
7
|
+
startLine,
|
|
8
|
+
startColumn: node.startColumn ?? node.column ?? node.beginColumn,
|
|
9
|
+
endLine: node.endLine,
|
|
10
|
+
endColumn: node.endColumn
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{kotlinPsiPosition}from'./kotlinPsiPosition.js';import{spanFromKotlinLineFields}from'./spanFromKotlinLineFields.js';import{spanFromKotlinRange}from'./spanFromKotlinRange.js';
|
|
2
|
+
export function spanFromKotlinPsiNode(node, input, options = {}) {
|
|
3
|
+
const direct = spanFromKotlinLineFields(node, input);
|
|
4
|
+
if (direct) return direct;
|
|
5
|
+
const range = node.sourceRange ?? node.range ?? node.span ?? node.textRange;
|
|
6
|
+
const fromRange = spanFromKotlinRange(range, input);
|
|
7
|
+
if (fromRange) return fromRange;
|
|
8
|
+
const start = kotlinPsiPosition(node.start ?? node.startOffset ?? range?.startOffset ?? range?.start, options);
|
|
9
|
+
const end = kotlinPsiPosition(node.end ?? node.endOffset ?? range?.endOffset ?? range?.end, options);
|
|
10
|
+
if (!start) return undefined;
|
|
11
|
+
return {
|
|
12
|
+
sourceId: input.sourceHash,
|
|
13
|
+
path: start.path ?? end?.path ?? input.sourcePath,
|
|
14
|
+
startLine: start.line,
|
|
15
|
+
startColumn: start.column,
|
|
16
|
+
endLine: end?.line,
|
|
17
|
+
endColumn: end?.column
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function spanFromKotlinRange(range, input) {
|
|
2
|
+
if (!range || typeof range !== 'object') return undefined;
|
|
3
|
+
const start = range.start ?? range.startPosition ?? range.lowerBound ?? range.begin;
|
|
4
|
+
const end = range.end ?? range.endPosition ?? range.upperBound;
|
|
5
|
+
const line = start?.line ?? start?.Line;
|
|
6
|
+
if (typeof line !== 'number') return undefined;
|
|
7
|
+
const column = start.column ?? start.character ?? start.offset ?? start.Column;
|
|
8
|
+
const endLine = end?.line ?? end?.Line;
|
|
9
|
+
const endColumn = end?.column ?? end?.character ?? end?.offset ?? end?.Column;
|
|
10
|
+
return {
|
|
11
|
+
sourceId: input.sourceHash,
|
|
12
|
+
path: range.path ?? range.filePath ?? range.file ?? input.sourcePath,
|
|
13
|
+
startLine: line,
|
|
14
|
+
startColumn: typeof column === 'number' ? column : undefined,
|
|
15
|
+
endLine: typeof endLine === 'number' ? endLine : undefined,
|
|
16
|
+
endColumn: typeof endColumn === 'number' ? endColumn : undefined
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function spanFromLoc(loc, input) {
|
|
2
|
+
if (!loc?.start) return undefined;
|
|
3
|
+
return {
|
|
4
|
+
sourceId: input.sourceHash,
|
|
5
|
+
path: input.sourcePath ?? loc.filename,
|
|
6
|
+
startLine: loc.start.line,
|
|
7
|
+
startColumn: typeof loc.start.column === 'number' ? loc.start.column + 1 : undefined,
|
|
8
|
+
endLine: loc.end?.line,
|
|
9
|
+
endColumn: typeof loc.end?.column === 'number' ? loc.end.column + 1 : undefined
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function spanFromLspRange(range, sourcePath, sourceHash, base = 0) {
|
|
2
|
+
if (!range) return undefined;
|
|
3
|
+
const source = range.start && range.end ? range : { start: range, end: range.end ?? range };
|
|
4
|
+
return {
|
|
5
|
+
sourceId: sourceHash,
|
|
6
|
+
path: sourcePath,
|
|
7
|
+
startLine: Number(source.start?.line ?? source.startLine ?? 0) + (base === 0 ? 1 : 0),
|
|
8
|
+
startColumn: Number(source.start?.character ?? source.startColumn ?? 0) + (base === 0 ? 1 : 0),
|
|
9
|
+
endLine: Number(source.end?.line ?? source.endLine ?? source.start?.line ?? 0) + (base === 0 ? 1 : 0),
|
|
10
|
+
endColumn: Number(source.end?.character ?? source.endColumn ?? source.start?.character ?? 0) + (base === 0 ? 1 : 0)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function spanFromPythonAstNode(node, input) {
|
|
2
|
+
const line = node.lineno ?? node.line;
|
|
3
|
+
if (typeof line !== 'number') return undefined;
|
|
4
|
+
const col = node.col_offset ?? node.colOffset;
|
|
5
|
+
const endLine = node.end_lineno ?? node.endLine;
|
|
6
|
+
const endCol = node.end_col_offset ?? node.endColOffset;
|
|
7
|
+
return {
|
|
8
|
+
sourceId: input.sourceHash,
|
|
9
|
+
path: input.sourcePath,
|
|
10
|
+
startLine: line,
|
|
11
|
+
startColumn: typeof col === 'number' ? col + 1 : undefined,
|
|
12
|
+
endLine: typeof endLine === 'number' ? endLine : undefined,
|
|
13
|
+
endColumn: typeof endCol === 'number' ? endCol + 1 : undefined
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{rustSynColumnToOneBased}from'./rustSynColumnToOneBased.js';
|
|
2
|
+
export function spanFromRustSynNode(node, input) {
|
|
3
|
+
const span = node.span ?? node.ident?.span ?? node.sig?.ident?.span ?? node.name?.span;
|
|
4
|
+
if (!span || typeof span !== 'object') return undefined;
|
|
5
|
+
const start = span.start ?? span.lo ?? span.begin;
|
|
6
|
+
const end = span.end ?? span.hi;
|
|
7
|
+
const startLine = span.startLine ?? span.line ?? start?.line;
|
|
8
|
+
const startColumn = span.startColumn ?? span.column ?? start?.column;
|
|
9
|
+
const endLine = span.endLine ?? end?.line;
|
|
10
|
+
const endColumn = span.endColumn ?? end?.column;
|
|
11
|
+
if (typeof startLine !== 'number') return undefined;
|
|
12
|
+
return {
|
|
13
|
+
sourceId: input.sourceHash,
|
|
14
|
+
path: input.sourcePath,
|
|
15
|
+
startLine,
|
|
16
|
+
startColumn: typeof startColumn === 'number' ? rustSynColumnToOneBased(startColumn, span) : undefined,
|
|
17
|
+
endLine: typeof endLine === 'number' ? endLine : undefined,
|
|
18
|
+
endColumn: typeof endColumn === 'number' ? rustSynColumnToOneBased(endColumn, span) : undefined
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export function spanFromScipOccurrence(occurrence, sourcePath, sourceHash) {
|
|
2
|
+
if (occurrence.single_line_range || occurrence.singleLineRange) {
|
|
3
|
+
const range = occurrence.single_line_range ?? occurrence.singleLineRange;
|
|
4
|
+
return {
|
|
5
|
+
sourceId: sourceHash,
|
|
6
|
+
path: sourcePath,
|
|
7
|
+
startLine: Number(range.line ?? 0) + 1,
|
|
8
|
+
startColumn: Number(range.start_character ?? range.startCharacter ?? 0) + 1,
|
|
9
|
+
endLine: Number(range.line ?? 0) + 1,
|
|
10
|
+
endColumn: Number(range.end_character ?? range.endCharacter ?? 0) + 1
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (occurrence.multi_line_range || occurrence.multiLineRange) {
|
|
14
|
+
const range = occurrence.multi_line_range ?? occurrence.multiLineRange;
|
|
15
|
+
return {
|
|
16
|
+
sourceId: sourceHash,
|
|
17
|
+
path: sourcePath,
|
|
18
|
+
startLine: Number(range.start_line ?? range.startLine ?? 0) + 1,
|
|
19
|
+
startColumn: Number(range.start_character ?? range.startCharacter ?? 0) + 1,
|
|
20
|
+
endLine: Number(range.end_line ?? range.endLine ?? 0) + 1,
|
|
21
|
+
endColumn: Number(range.end_character ?? range.endCharacter ?? 0) + 1
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const range = occurrence.range;
|
|
25
|
+
if (Array.isArray(range) && range.length >= 3) {
|
|
26
|
+
const startLine = Number(range[0] ?? 0);
|
|
27
|
+
const startColumn = Number(range[1] ?? 0);
|
|
28
|
+
const endLine = range.length >= 4 ? Number(range[2] ?? startLine) : startLine;
|
|
29
|
+
const endColumn = range.length >= 4 ? Number(range[3] ?? startColumn) : Number(range[2] ?? startColumn);
|
|
30
|
+
return {
|
|
31
|
+
sourceId: sourceHash,
|
|
32
|
+
path: sourcePath,
|
|
33
|
+
startLine: startLine + 1,
|
|
34
|
+
startColumn: startColumn + 1,
|
|
35
|
+
endLine: endLine + 1,
|
|
36
|
+
endColumn: endColumn + 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function spanFromSemanticDbRange(range, sourcePath, sourceHash) {
|
|
2
|
+
if (!range) return undefined;
|
|
3
|
+
return {
|
|
4
|
+
sourceId: sourceHash,
|
|
5
|
+
path: sourcePath,
|
|
6
|
+
startLine: Number(range.start_line ?? range.startLine ?? 0) + 1,
|
|
7
|
+
startColumn: Number(range.start_character ?? range.startCharacter ?? 0) + 1,
|
|
8
|
+
endLine: Number(range.end_line ?? range.endLine ?? 0) + 1,
|
|
9
|
+
endColumn: Number(range.end_character ?? range.endCharacter ?? 0) + 1
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function spanFromSwiftLineFields(node, input) {
|
|
2
|
+
const startLine = node.startLine ?? node.line ?? node.beginLine;
|
|
3
|
+
if (typeof startLine !== 'number') return undefined;
|
|
4
|
+
return {
|
|
5
|
+
sourceId: input.sourceHash,
|
|
6
|
+
path: node.path ?? node.filePath ?? node.file ?? input.sourcePath,
|
|
7
|
+
startLine,
|
|
8
|
+
startColumn: node.startColumn ?? node.column ?? node.beginColumn,
|
|
9
|
+
endLine: node.endLine,
|
|
10
|
+
endColumn: node.endColumn
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function spanFromSwiftRange(range, input) {
|
|
2
|
+
if (!range || typeof range !== 'object') return undefined;
|
|
3
|
+
const start = range.start ?? range.lowerBound ?? range.begin;
|
|
4
|
+
const end = range.end ?? range.upperBound;
|
|
5
|
+
const line = start?.line ?? start?.Line;
|
|
6
|
+
if (typeof line !== 'number') return undefined;
|
|
7
|
+
const column = start.column ?? start.character ?? start.utf8Column ?? start.Column;
|
|
8
|
+
const endLine = end?.line ?? end?.Line;
|
|
9
|
+
const endColumn = end?.column ?? end?.character ?? end?.utf8Column ?? end?.Column;
|
|
10
|
+
return {
|
|
11
|
+
sourceId: input.sourceHash,
|
|
12
|
+
path: range.path ?? range.filePath ?? range.file ?? input.sourcePath,
|
|
13
|
+
startLine: line,
|
|
14
|
+
startColumn: typeof column === 'number' ? column : undefined,
|
|
15
|
+
endLine: typeof endLine === 'number' ? endLine : undefined,
|
|
16
|
+
endColumn: typeof endColumn === 'number' ? endColumn : undefined
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{spanFromSwiftLineFields}from'./spanFromSwiftLineFields.js';import{spanFromSwiftRange}from'./spanFromSwiftRange.js';import{swiftSyntaxPosition}from'./swiftSyntaxPosition.js';
|
|
2
|
+
export function spanFromSwiftSyntaxNode(node, input, options = {}) {
|
|
3
|
+
const direct = spanFromSwiftLineFields(node, input);
|
|
4
|
+
if (direct) return direct;
|
|
5
|
+
const range = node.sourceRange ?? node.range ?? node.span;
|
|
6
|
+
const fromRange = spanFromSwiftRange(range, input);
|
|
7
|
+
if (fromRange) return fromRange;
|
|
8
|
+
const start = swiftSyntaxPosition(node.position ?? node.absolutePosition ?? node.start ?? range?.start, options);
|
|
9
|
+
const end = swiftSyntaxPosition(node.endPosition ?? node.end ?? range?.end, options);
|
|
10
|
+
if (!start) return undefined;
|
|
11
|
+
return {
|
|
12
|
+
sourceId: input.sourceHash,
|
|
13
|
+
path: start.path ?? end?.path ?? input.sourcePath,
|
|
14
|
+
startLine: start.line,
|
|
15
|
+
startColumn: start.column,
|
|
16
|
+
endLine: end?.line,
|
|
17
|
+
endColumn: end?.column
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function spanFromTreeSitterNode(node, input) {
|
|
2
|
+
const start = node.startPosition;
|
|
3
|
+
if (!start) return undefined;
|
|
4
|
+
const end = node.endPosition;
|
|
5
|
+
return {
|
|
6
|
+
sourceId: input.sourceHash,
|
|
7
|
+
path: input.sourcePath,
|
|
8
|
+
startLine: start.row + 1,
|
|
9
|
+
startColumn: start.column + 1,
|
|
10
|
+
endLine: end ? end.row + 1 : undefined,
|
|
11
|
+
endColumn: end ? end.column + 1 : undefined
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function spanFromTypeScriptNode(node, sourceFile) {
|
|
2
|
+
const start = typeof node.getStart === 'function' ? node.getStart(sourceFile) : node.pos;
|
|
3
|
+
const end = typeof node.getEnd === 'function' ? node.getEnd() : node.end;
|
|
4
|
+
if (typeof start !== 'number' || typeof sourceFile?.getLineAndCharacterOfPosition !== 'function') return undefined;
|
|
5
|
+
const startPos = sourceFile.getLineAndCharacterOfPosition(start);
|
|
6
|
+
const endPos = typeof end === 'number' ? sourceFile.getLineAndCharacterOfPosition(end) : undefined;
|
|
7
|
+
return {
|
|
8
|
+
sourceId: sourceFile.sourceHash,
|
|
9
|
+
path: sourceFile.fileName,
|
|
10
|
+
startLine: startPos.line + 1,
|
|
11
|
+
startColumn: startPos.character + 1,
|
|
12
|
+
endLine: endPos ? endPos.line + 1 : undefined,
|
|
13
|
+
endColumn: endPos ? endPos.character + 1 : undefined
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{identifierName}from'./identifierName.js';
|
|
2
|
+
export function stringFromTsExpression(node) {
|
|
3
|
+
if (!node) return undefined;
|
|
4
|
+
if (typeof node.text === 'string') return node.text;
|
|
5
|
+
if (typeof node.value === 'string') return node.value;
|
|
6
|
+
return identifierName(node);
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{countBy}from'../../native-import-utils.js';
|
|
2
|
+
export function summarizeNativeChangedRegionProjections(regions) {
|
|
3
|
+
const projections = (regions ?? [])
|
|
4
|
+
.map((region) => region?.metadata?.changedRegionProjection)
|
|
5
|
+
.filter(Boolean);
|
|
6
|
+
return {
|
|
7
|
+
schema: 'frontier.lang.changedRegionProjectionSummary.v1',
|
|
8
|
+
total: regions?.length ?? 0,
|
|
9
|
+
withProjection: projections.length,
|
|
10
|
+
reviewRequired: projections.filter((projection) => projection.reviewRequired === true).length,
|
|
11
|
+
autoMergeClaims: projections.filter((projection) => projection.autoMergeClaim === true).length,
|
|
12
|
+
sourceMapLinks: projections.reduce((sum, projection) => sum + (projection.sourceMapLinks?.length ?? 0), 0),
|
|
13
|
+
byAction: countBy(projections.map((projection) => projection.admission?.action ?? 'unknown')),
|
|
14
|
+
byRegionKind: countBy(projections.map((projection) => projection.region?.kind ?? 'unknown'))
|
|
15
|
+
};
|
|
16
|
+
}
|