@shapeshift-labs/frontier-lang-compiler 0.2.41 → 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 +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{declarationRecord}from'./declarationRecord.js';import{nativeNodeId}from'./nativeNodeId.js';import{shortNodeText}from'./shortNodeText.js';import{treeSitterFieldText}from'./treeSitterFieldText.js';
|
|
2
|
+
export function treeSitterDeclaration(node, kind, nativeNodeId, input) {
|
|
3
|
+
if (/import|include|use/.test(kind)) {
|
|
4
|
+
const name = treeSitterFieldText(node, 'path') ?? treeSitterFieldText(node, 'source') ?? shortNodeText(node);
|
|
5
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'module', 'import');
|
|
6
|
+
}
|
|
7
|
+
if (/function|method|fn_item|function_declaration/.test(kind)) {
|
|
8
|
+
const name = treeSitterFieldText(node, 'name');
|
|
9
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'function', 'definition');
|
|
10
|
+
}
|
|
11
|
+
if (/class/.test(kind)) {
|
|
12
|
+
const name = treeSitterFieldText(node, 'name');
|
|
13
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'class', 'definition');
|
|
14
|
+
}
|
|
15
|
+
if (/interface/.test(kind)) {
|
|
16
|
+
const name = treeSitterFieldText(node, 'name');
|
|
17
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'interface', 'definition');
|
|
18
|
+
}
|
|
19
|
+
if (/struct|enum|type/.test(kind)) {
|
|
20
|
+
const name = treeSitterFieldText(node, 'name');
|
|
21
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'type', 'definition');
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
export function truncatedAstLoss(input, context, options) {
|
|
3
|
+
return {
|
|
4
|
+
id: `loss_${idFragment(input.sourcePath ?? input.language)}_${idFragment(options.astFormat ?? options.parser)}_truncated`,
|
|
5
|
+
severity: 'warning',
|
|
6
|
+
phase: 'read',
|
|
7
|
+
sourceFormat: input.language,
|
|
8
|
+
kind: 'opaqueNative',
|
|
9
|
+
message: `Native AST normalization stopped after ${context.maxNodes} node(s).`,
|
|
10
|
+
metadata: {
|
|
11
|
+
parser: options.parser,
|
|
12
|
+
astFormat: options.astFormat,
|
|
13
|
+
maxNodes: context.maxNodes
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{declarationRecord}from'./declarationRecord.js';import{namedDeclaration}from'./namedDeclaration.js';import{nativeNodeId}from'./nativeNodeId.js';import{stringFromTsExpression}from'./stringFromTsExpression.js';
|
|
2
|
+
export function typeScriptDeclaration(node, kind, nativeNodeId, input) {
|
|
3
|
+
if (kind === 'ImportDeclaration' || kind === 'ImportEqualsDeclaration') {
|
|
4
|
+
const name = stringFromTsExpression(node.moduleSpecifier) ?? stringFromTsExpression(node.externalModuleReference?.expression);
|
|
5
|
+
if (name) return declarationRecord(input, nativeNodeId, name, 'module', 'import');
|
|
6
|
+
}
|
|
7
|
+
if (kind === 'FunctionDeclaration') return namedDeclaration(input, nativeNodeId, node.name, 'function');
|
|
8
|
+
if (kind === 'ClassDeclaration') return namedDeclaration(input, nativeNodeId, node.name, 'class');
|
|
9
|
+
if (kind === 'InterfaceDeclaration') return namedDeclaration(input, nativeNodeId, node.name, 'interface');
|
|
10
|
+
if (kind === 'TypeAliasDeclaration' || kind === 'EnumDeclaration') return namedDeclaration(input, nativeNodeId, node.name, 'type');
|
|
11
|
+
if (kind === 'VariableDeclaration') return namedDeclaration(input, nativeNodeId, node.name, 'variable');
|
|
12
|
+
if (kind === 'MethodDeclaration' || kind === 'MethodSignature') return namedDeclaration(input, nativeNodeId, node.name, 'method');
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function typeScriptKindName(node, ts) {
|
|
2
|
+
if (typeof node.kindName === 'string') return node.kindName;
|
|
3
|
+
if (ts?.SyntaxKind && node.kind !== undefined) return ts.SyntaxKind[node.kind] ?? `SyntaxKind${node.kind}`;
|
|
4
|
+
if (typeof node.kind === 'string') return node.kind;
|
|
5
|
+
return `SyntaxKind${node.kind ?? 'Unknown'}`;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function uniqueNativeProjectionDeclarations(declarations) {
|
|
2
|
+
const seen = new Set();
|
|
3
|
+
return declarations.filter((declaration) => {
|
|
4
|
+
const key = `${declaration.kind}:${declaration.name}:${declaration.symbolId ?? declaration.nativeAstNodeId ?? ''}`;
|
|
5
|
+
if (seen.has(key)) return false;
|
|
6
|
+
seen.add(key);
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function uniqueSemanticSliceNativeNodes(nodes) {
|
|
2
|
+
const seen = new Set();
|
|
3
|
+
const result = [];
|
|
4
|
+
for (const node of nodes ?? []) {
|
|
5
|
+
const id = node?.id ?? node?.nodeId;
|
|
6
|
+
if (!id || seen.has(id)) continue;
|
|
7
|
+
seen.add(id);
|
|
8
|
+
result.push({ ...node, id });
|
|
9
|
+
}
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
export function uniqueSemanticSliceRegions(regions) {
|
|
3
|
+
const seen = new Set();
|
|
4
|
+
const result = [];
|
|
5
|
+
for (const region of regions ?? []) {
|
|
6
|
+
if (!region) continue;
|
|
7
|
+
const id = region.id ?? `region_${idFragment(region.key ?? region.sourcePath ?? region.symbolId ?? result.length)}`;
|
|
8
|
+
const key = region.key ?? id;
|
|
9
|
+
const dedupeKey = `${id}:${key}`;
|
|
10
|
+
if (seen.has(dedupeKey)) continue;
|
|
11
|
+
seen.add(dedupeKey);
|
|
12
|
+
result.push({ ...region, id, key });
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function uniqueSemanticSliceSpans(spans) {
|
|
2
|
+
const seen = new Set();
|
|
3
|
+
const result = [];
|
|
4
|
+
for (const span of spans ?? []) {
|
|
5
|
+
if (!span) continue;
|
|
6
|
+
const key = [
|
|
7
|
+
span.path,
|
|
8
|
+
span.sourceId,
|
|
9
|
+
span.start,
|
|
10
|
+
span.end,
|
|
11
|
+
span.startLine,
|
|
12
|
+
span.startColumn,
|
|
13
|
+
span.endLine,
|
|
14
|
+
span.endColumn
|
|
15
|
+
].join(':');
|
|
16
|
+
if (seen.has(key)) continue;
|
|
17
|
+
seen.add(key);
|
|
18
|
+
result.push(span);
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function unverifiedNativeAstLosses(input, nativeAst, context) {
|
|
2
|
+
if (context.lightweight || context.exactAst || context.hasLosses) return [];
|
|
3
|
+
if (!(input?.nativeAst || input?.nodes)) return [];
|
|
4
|
+
return [{
|
|
5
|
+
id: `loss_${context.importIdPart}_unverified_native_ast`,
|
|
6
|
+
severity: 'warning',
|
|
7
|
+
kind: 'unverifiedNativeAst',
|
|
8
|
+
nodeId: nativeAst?.rootId,
|
|
9
|
+
message: 'Caller supplied native AST nodes without explicit exactAst or adapter coverage evidence.',
|
|
10
|
+
metadata: {
|
|
11
|
+
reason: 'missing-exact-ast-evidence',
|
|
12
|
+
nativeAstId: nativeAst?.id,
|
|
13
|
+
parser: nativeAst?.parser
|
|
14
|
+
}
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
import{csharpGeneratedCodeLoss}from'./csharpGeneratedCodeLoss.js';import{csharpGeneratedCodeMarker}from'./csharpGeneratedCodeMarker.js';import{csharpRoslynChildEntries}from'./csharpRoslynChildEntries.js';import{csharpRoslynDeclarations}from'./csharpRoslynDeclarations.js';import{csharpRoslynDirectiveKind}from'./csharpRoslynDirectiveKind.js';import{csharpRoslynKind}from'./csharpRoslynKind.js';import{csharpRoslynNodeValue}from'./csharpRoslynNodeValue.js';import{csharpRoslynPositionKind}from'./csharpRoslynPositionKind.js';import{csharpRoslynProblemNode}from'./csharpRoslynProblemNode.js';import{csharpRoslynRecoveredKind}from'./csharpRoslynRecoveredKind.js';import{isCSharpRoslynNode}from'./isCSharpRoslynNode.js';import{nativeNodeId}from'./nativeNodeId.js';import{numberOrUndefined}from'./numberOrUndefined.js';import{primitiveCSharpRoslynFields}from'./primitiveCSharpRoslynFields.js';import{spanFromCSharpRoslynNode}from'./spanFromCSharpRoslynNode.js';
|
|
3
|
+
export function visitCSharpRoslynNode(node, context, propertyPath) {
|
|
4
|
+
if (!isCSharpRoslynNode(node) || context.truncated) return undefined;
|
|
5
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
6
|
+
if (context.counter >= context.maxNodes) {
|
|
7
|
+
context.truncated = true;
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const kind = csharpRoslynKind(node);
|
|
11
|
+
const span = spanFromCSharpRoslynNode(node, context.input, context.options);
|
|
12
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
13
|
+
context.objectIds.set(node, id);
|
|
14
|
+
if (!context.rootId) context.rootId = id;
|
|
15
|
+
const children = [];
|
|
16
|
+
for (const [field, value] of csharpRoslynChildEntries(node, kind)) {
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
value.forEach((entry, index) => {
|
|
19
|
+
const childId = visitCSharpRoslynNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
20
|
+
if (childId) children.push(childId);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
const childId = visitCSharpRoslynNode(value, context, `${propertyPath}.${field}`);
|
|
24
|
+
if (childId) children.push(childId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const declarations = csharpRoslynDeclarations(node, kind, id, context.input);
|
|
28
|
+
const declaration = declarations[0];
|
|
29
|
+
const nativeNode = {
|
|
30
|
+
id,
|
|
31
|
+
kind,
|
|
32
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
33
|
+
span,
|
|
34
|
+
value: declaration?.name ?? csharpRoslynNodeValue(node),
|
|
35
|
+
fields: primitiveCSharpRoslynFields(node, kind),
|
|
36
|
+
children,
|
|
37
|
+
metadata: {
|
|
38
|
+
astFormat: context.options.astFormat,
|
|
39
|
+
propertyPath,
|
|
40
|
+
rawKind: numberOrUndefined(node.rawKind ?? node.RawKind),
|
|
41
|
+
positionKind: csharpRoslynPositionKind(node),
|
|
42
|
+
parser: context.options.parser
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
context.nodes[id] = nativeNode;
|
|
46
|
+
for (const entry of declarations) {
|
|
47
|
+
context.declarations.push({ ...entry, nativeNode });
|
|
48
|
+
}
|
|
49
|
+
if (csharpRoslynRecoveredKind(kind) || csharpRoslynProblemNode(node, kind)) {
|
|
50
|
+
context.losses.push({
|
|
51
|
+
id: `loss_${idFragment(id)}_csharp_roslyn_recovered_node`,
|
|
52
|
+
severity: 'error',
|
|
53
|
+
phase: 'parse',
|
|
54
|
+
sourceFormat: context.input.language,
|
|
55
|
+
kind: 'unsupportedSyntax',
|
|
56
|
+
message: 'Roslyn reported skipped text, missing syntax, or syntax diagnostics; semantic import is partial until syntax errors are resolved.',
|
|
57
|
+
span,
|
|
58
|
+
nodeId: id,
|
|
59
|
+
metadata: {
|
|
60
|
+
parser: context.options.parser,
|
|
61
|
+
astFormat: context.options.astFormat,
|
|
62
|
+
nodeKind: kind
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (csharpRoslynDirectiveKind(kind)) {
|
|
67
|
+
context.losses.push({
|
|
68
|
+
id: `loss_${idFragment(id)}_csharp_preprocessor`,
|
|
69
|
+
severity: 'warning',
|
|
70
|
+
phase: 'parse',
|
|
71
|
+
sourceFormat: context.input.language,
|
|
72
|
+
kind: 'preprocessor',
|
|
73
|
+
message: 'C# preprocessor directive was imported as syntax; conditional compilation state and inactive branches require host evidence.',
|
|
74
|
+
span,
|
|
75
|
+
nodeId: id,
|
|
76
|
+
metadata: {
|
|
77
|
+
parser: context.options.parser,
|
|
78
|
+
astFormat: context.options.astFormat,
|
|
79
|
+
nodeKind: kind
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (csharpGeneratedCodeMarker(node, kind)) {
|
|
84
|
+
context.losses.push(csharpGeneratedCodeLoss(context.input, id, span, context.options, { nodeKind: kind }));
|
|
85
|
+
}
|
|
86
|
+
return id;
|
|
87
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
import{clangAstChildEntries}from'./clangAstChildEntries.js';import{clangAstDeclaration}from'./clangAstDeclaration.js';import{clangAstKind}from'./clangAstKind.js';import{clangAstNodeValue}from'./clangAstNodeValue.js';import{clangLocationKind}from'./clangLocationKind.js';import{clangPreprocessorKind}from'./clangPreprocessorKind.js';import{isClangAstNode}from'./isClangAstNode.js';import{nativeNodeId}from'./nativeNodeId.js';import{primitiveClangAstFields}from'./primitiveClangAstFields.js';import{spanFromClangAstNode}from'./spanFromClangAstNode.js';
|
|
3
|
+
export function visitClangAstNode(node, context, propertyPath) {
|
|
4
|
+
if (!isClangAstNode(node) || context.truncated) return undefined;
|
|
5
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
6
|
+
if (context.counter >= context.maxNodes) {
|
|
7
|
+
context.truncated = true;
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const kind = clangAstKind(node);
|
|
11
|
+
const span = spanFromClangAstNode(node, context.input);
|
|
12
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
13
|
+
context.objectIds.set(node, id);
|
|
14
|
+
if (!context.rootId) context.rootId = id;
|
|
15
|
+
const children = [];
|
|
16
|
+
for (const [field, value] of clangAstChildEntries(node)) {
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
value.forEach((entry, index) => {
|
|
19
|
+
const childId = visitClangAstNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
20
|
+
if (childId) children.push(childId);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
const childId = visitClangAstNode(value, context, `${propertyPath}.${field}`);
|
|
24
|
+
if (childId) children.push(childId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const declaration = clangAstDeclaration(node, kind, id, context.input);
|
|
28
|
+
const nativeNode = {
|
|
29
|
+
id,
|
|
30
|
+
kind,
|
|
31
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
32
|
+
span,
|
|
33
|
+
value: declaration?.name ?? clangAstNodeValue(node),
|
|
34
|
+
fields: primitiveClangAstFields(node, kind),
|
|
35
|
+
children,
|
|
36
|
+
metadata: {
|
|
37
|
+
astFormat: context.options.astFormat,
|
|
38
|
+
propertyPath,
|
|
39
|
+
clangId: typeof node.id === 'string' || typeof node.id === 'number' ? String(node.id) : undefined,
|
|
40
|
+
locationKind: clangLocationKind(node)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
context.nodes[id] = nativeNode;
|
|
44
|
+
if (declaration) context.declarations.push({ ...declaration, nativeNode });
|
|
45
|
+
if (clangPreprocessorKind(kind)) {
|
|
46
|
+
context.losses.push({
|
|
47
|
+
id: `loss_${idFragment(id)}_clang_preprocessor`,
|
|
48
|
+
severity: 'warning',
|
|
49
|
+
phase: 'parse',
|
|
50
|
+
sourceFormat: context.input.language,
|
|
51
|
+
kind: 'preprocessor',
|
|
52
|
+
message: 'Clang AST preprocessor records were imported, but macro expansion, inactive branches, and compile-command provenance require host evidence.',
|
|
53
|
+
span,
|
|
54
|
+
nodeId: id,
|
|
55
|
+
metadata: {
|
|
56
|
+
parser: context.options.parser,
|
|
57
|
+
astFormat: context.options.astFormat
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return id;
|
|
62
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
import{goAstChildEntries}from'./goAstChildEntries.js';import{goAstDeclarations}from'./goAstDeclarations.js';import{goAstKind}from'./goAstKind.js';import{goAstNodeValue}from'./goAstNodeValue.js';import{goAstPositionKind}from'./goAstPositionKind.js';import{goBadAstKind}from'./goBadAstKind.js';import{goGeneratedCodeMarker}from'./goGeneratedCodeMarker.js';import{goReceiverFieldCount}from'./goReceiverFieldCount.js';import{isGoAstNode}from'./isGoAstNode.js';import{nativeNodeId}from'./nativeNodeId.js';import{primitiveGoAstFields}from'./primitiveGoAstFields.js';import{spanFromGoAstNode}from'./spanFromGoAstNode.js';
|
|
3
|
+
export function visitGoAstNode(node, context, propertyPath) {
|
|
4
|
+
if (!isGoAstNode(node) || context.truncated) return undefined;
|
|
5
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
6
|
+
if (context.counter >= context.maxNodes) {
|
|
7
|
+
context.truncated = true;
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const kind = goAstKind(node);
|
|
11
|
+
const span = spanFromGoAstNode(node, context.input, context.options);
|
|
12
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
13
|
+
context.objectIds.set(node, id);
|
|
14
|
+
if (!context.rootId) context.rootId = id;
|
|
15
|
+
const children = [];
|
|
16
|
+
for (const [field, value] of goAstChildEntries(node)) {
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
value.forEach((entry, index) => {
|
|
19
|
+
const childId = visitGoAstNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
20
|
+
if (childId) children.push(childId);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
const childId = visitGoAstNode(value, context, `${propertyPath}.${field}`);
|
|
24
|
+
if (childId) children.push(childId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const declarations = goAstDeclarations(node, kind, id, context.input);
|
|
28
|
+
const declaration = declarations[0];
|
|
29
|
+
const nativeNode = {
|
|
30
|
+
id,
|
|
31
|
+
kind,
|
|
32
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
33
|
+
span,
|
|
34
|
+
value: declaration?.name ?? goAstNodeValue(node),
|
|
35
|
+
fields: primitiveGoAstFields(node, kind),
|
|
36
|
+
children,
|
|
37
|
+
metadata: {
|
|
38
|
+
astFormat: context.options.astFormat,
|
|
39
|
+
propertyPath,
|
|
40
|
+
positionKind: goAstPositionKind(node),
|
|
41
|
+
packageName: context.options.packageName
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
context.nodes[id] = nativeNode;
|
|
45
|
+
for (const entry of declarations) {
|
|
46
|
+
context.declarations.push({ ...entry, nativeNode });
|
|
47
|
+
}
|
|
48
|
+
if (goBadAstKind(kind)) {
|
|
49
|
+
context.losses.push({
|
|
50
|
+
id: `loss_${idFragment(id)}_go_bad_node`,
|
|
51
|
+
severity: 'error',
|
|
52
|
+
phase: 'parse',
|
|
53
|
+
sourceFormat: context.input.language,
|
|
54
|
+
kind: 'unsupportedSyntax',
|
|
55
|
+
message: 'Go parser recovered a BadDecl/BadExpr/BadStmt node; semantic import is partial until syntax errors are resolved.',
|
|
56
|
+
span,
|
|
57
|
+
nodeId: id,
|
|
58
|
+
metadata: {
|
|
59
|
+
parser: context.options.parser,
|
|
60
|
+
astFormat: context.options.astFormat,
|
|
61
|
+
nodeKind: kind
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (kind === 'FuncDecl' && goReceiverFieldCount(node) > 1) {
|
|
66
|
+
context.losses.push({
|
|
67
|
+
id: `loss_${idFragment(id)}_go_multiple_receivers`,
|
|
68
|
+
severity: 'warning',
|
|
69
|
+
phase: 'parse',
|
|
70
|
+
sourceFormat: context.input.language,
|
|
71
|
+
kind: 'unsupportedSyntax',
|
|
72
|
+
message: 'Go parser accepted multiple receiver fields; valid method ownership requires a single receiver.',
|
|
73
|
+
span,
|
|
74
|
+
nodeId: id,
|
|
75
|
+
metadata: {
|
|
76
|
+
parser: context.options.parser,
|
|
77
|
+
astFormat: context.options.astFormat,
|
|
78
|
+
receiverFieldCount: goReceiverFieldCount(node)
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (goGeneratedCodeMarker(node, kind)) {
|
|
83
|
+
context.losses.push({
|
|
84
|
+
id: `loss_${idFragment(id)}_go_generated_code`,
|
|
85
|
+
severity: 'warning',
|
|
86
|
+
phase: 'parse',
|
|
87
|
+
sourceFormat: context.input.language,
|
|
88
|
+
kind: 'generatedCode',
|
|
89
|
+
message: 'Go generated-code marker was imported; regeneration provenance and source ownership require host evidence.',
|
|
90
|
+
span,
|
|
91
|
+
nodeId: id,
|
|
92
|
+
metadata: {
|
|
93
|
+
parser: context.options.parser,
|
|
94
|
+
astFormat: context.options.astFormat
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return id;
|
|
99
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
import{isJavaAstNode}from'./isJavaAstNode.js';import{javaAstChildEntries}from'./javaAstChildEntries.js';import{javaAstDeclarations}from'./javaAstDeclarations.js';import{javaAstKind}from'./javaAstKind.js';import{javaAstNodeValue}from'./javaAstNodeValue.js';import{javaAstPositionKind}from'./javaAstPositionKind.js';import{javaGeneratedCodeLoss}from'./javaGeneratedCodeLoss.js';import{javaGeneratedCodeMarker}from'./javaGeneratedCodeMarker.js';import{javaLombokAnnotationMarker}from'./javaLombokAnnotationMarker.js';import{javaProblemNode}from'./javaProblemNode.js';import{javaRecoveredAstKind}from'./javaRecoveredAstKind.js';import{nativeNodeId}from'./nativeNodeId.js';import{primitiveJavaAstFields}from'./primitiveJavaAstFields.js';import{spanFromJavaAstNode}from'./spanFromJavaAstNode.js';
|
|
3
|
+
export function visitJavaAstNode(node, context, propertyPath) {
|
|
4
|
+
if (!isJavaAstNode(node) || context.truncated) return undefined;
|
|
5
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
6
|
+
if (context.counter >= context.maxNodes) {
|
|
7
|
+
context.truncated = true;
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const kind = javaAstKind(node);
|
|
11
|
+
const span = spanFromJavaAstNode(node, context.input, context.options);
|
|
12
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
13
|
+
context.objectIds.set(node, id);
|
|
14
|
+
if (!context.rootId) context.rootId = id;
|
|
15
|
+
const children = [];
|
|
16
|
+
for (const [field, value] of javaAstChildEntries(node, kind)) {
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
value.forEach((entry, index) => {
|
|
19
|
+
const childId = visitJavaAstNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
20
|
+
if (childId) children.push(childId);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
const childId = visitJavaAstNode(value, context, `${propertyPath}.${field}`);
|
|
24
|
+
if (childId) children.push(childId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const declarations = javaAstDeclarations(node, kind, id, context.input);
|
|
28
|
+
const declaration = declarations[0];
|
|
29
|
+
const nativeNode = {
|
|
30
|
+
id,
|
|
31
|
+
kind,
|
|
32
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
33
|
+
span,
|
|
34
|
+
value: declaration?.name ?? javaAstNodeValue(node),
|
|
35
|
+
fields: primitiveJavaAstFields(node, kind),
|
|
36
|
+
children,
|
|
37
|
+
metadata: {
|
|
38
|
+
astFormat: context.options.astFormat,
|
|
39
|
+
propertyPath,
|
|
40
|
+
positionKind: javaAstPositionKind(node),
|
|
41
|
+
parser: context.options.parser
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
context.nodes[id] = nativeNode;
|
|
45
|
+
for (const entry of declarations) {
|
|
46
|
+
context.declarations.push({ ...entry, nativeNode });
|
|
47
|
+
}
|
|
48
|
+
if (javaRecoveredAstKind(kind) || javaProblemNode(node, kind)) {
|
|
49
|
+
context.losses.push({
|
|
50
|
+
id: `loss_${idFragment(id)}_java_recovered_node`,
|
|
51
|
+
severity: 'error',
|
|
52
|
+
phase: 'parse',
|
|
53
|
+
sourceFormat: context.input.language,
|
|
54
|
+
kind: 'unsupportedSyntax',
|
|
55
|
+
message: 'Java parser reported a recovered, erroneous, malformed, or problem node; semantic import is partial until syntax errors are resolved.',
|
|
56
|
+
span,
|
|
57
|
+
nodeId: id,
|
|
58
|
+
metadata: {
|
|
59
|
+
parser: context.options.parser,
|
|
60
|
+
astFormat: context.options.astFormat,
|
|
61
|
+
nodeKind: kind
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (javaGeneratedCodeMarker(node, kind) || javaLombokAnnotationMarker(node, kind)) {
|
|
66
|
+
context.losses.push(javaGeneratedCodeLoss(context.input, id, span, context.options, {
|
|
67
|
+
nodeKind: kind,
|
|
68
|
+
generatedMarker: javaGeneratedCodeMarker(node, kind),
|
|
69
|
+
lombokMarker: javaLombokAnnotationMarker(node, kind)
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
return id;
|
|
73
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import{idFragment}from'../../native-import-utils.js';
|
|
2
|
+
import{isKotlinPsiNode}from'./isKotlinPsiNode.js';import{kotlinCompilerPluginAnnotationNode}from'./kotlinCompilerPluginAnnotationNode.js';import{kotlinContractNode}from'./kotlinContractNode.js';import{kotlinCoroutineNode}from'./kotlinCoroutineNode.js';import{kotlinExpectActualNode}from'./kotlinExpectActualNode.js';import{kotlinGeneratedCodeLoss}from'./kotlinGeneratedCodeLoss.js';import{kotlinGeneratedCodeMarker}from'./kotlinGeneratedCodeMarker.js';import{kotlinPsiAnnotationNames}from'./kotlinPsiAnnotationNames.js';import{kotlinPsiChildEntries}from'./kotlinPsiChildEntries.js';import{kotlinPsiDeclarations}from'./kotlinPsiDeclarations.js';import{kotlinPsiKind}from'./kotlinPsiKind.js';import{kotlinPsiNodeValue}from'./kotlinPsiNodeValue.js';import{kotlinPsiPositionKind}from'./kotlinPsiPositionKind.js';import{kotlinPsiProblemNode}from'./kotlinPsiProblemNode.js';import{kotlinPsiRecoveredKind}from'./kotlinPsiRecoveredKind.js';import{kotlinUnsupportedSemanticLoss}from'./kotlinUnsupportedSemanticLoss.js';import{nativeNodeId}from'./nativeNodeId.js';import{primitiveKotlinPsiFields}from'./primitiveKotlinPsiFields.js';import{spanFromKotlinPsiNode}from'./spanFromKotlinPsiNode.js';
|
|
3
|
+
export function visitKotlinPsiNode(node, context, propertyPath) {
|
|
4
|
+
if (!isKotlinPsiNode(node) || context.truncated) return undefined;
|
|
5
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
6
|
+
if (context.counter >= context.maxNodes) {
|
|
7
|
+
context.truncated = true;
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const kind = kotlinPsiKind(node);
|
|
11
|
+
const span = spanFromKotlinPsiNode(node, context.input, context.options);
|
|
12
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
13
|
+
context.objectIds.set(node, id);
|
|
14
|
+
if (!context.rootId) context.rootId = id;
|
|
15
|
+
const children = [];
|
|
16
|
+
for (const [field, value] of kotlinPsiChildEntries(node, kind)) {
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
value.forEach((entry, index) => {
|
|
19
|
+
const childId = visitKotlinPsiNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
20
|
+
if (childId) children.push(childId);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
const childId = visitKotlinPsiNode(value, context, `${propertyPath}.${field}`);
|
|
24
|
+
if (childId) children.push(childId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const declarations = kotlinPsiDeclarations(node, kind, id, context.input);
|
|
28
|
+
const declaration = declarations[0];
|
|
29
|
+
const nativeNode = {
|
|
30
|
+
id,
|
|
31
|
+
kind,
|
|
32
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
33
|
+
span,
|
|
34
|
+
value: declaration?.name ?? kotlinPsiNodeValue(node),
|
|
35
|
+
fields: primitiveKotlinPsiFields(node, kind),
|
|
36
|
+
children,
|
|
37
|
+
metadata: {
|
|
38
|
+
astFormat: context.options.astFormat,
|
|
39
|
+
propertyPath,
|
|
40
|
+
positionKind: kotlinPsiPositionKind(node),
|
|
41
|
+
parser: context.options.parser
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
context.nodes[id] = nativeNode;
|
|
45
|
+
for (const entry of declarations) {
|
|
46
|
+
context.declarations.push({ ...entry, nativeNode });
|
|
47
|
+
}
|
|
48
|
+
if (kotlinPsiRecoveredKind(kind) || kotlinPsiProblemNode(node, kind)) {
|
|
49
|
+
context.losses.push({
|
|
50
|
+
id: `loss_${idFragment(id)}_kotlin_psi_recovered_node`,
|
|
51
|
+
severity: 'error',
|
|
52
|
+
phase: 'parse',
|
|
53
|
+
sourceFormat: context.input.language,
|
|
54
|
+
kind: 'unsupportedSyntax',
|
|
55
|
+
message: 'Kotlin PSI reported an error or recovered syntax node; semantic import is partial until syntax errors are resolved.',
|
|
56
|
+
span,
|
|
57
|
+
nodeId: id,
|
|
58
|
+
metadata: {
|
|
59
|
+
parser: context.options.parser,
|
|
60
|
+
astFormat: context.options.astFormat,
|
|
61
|
+
nodeKind: kind
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (kotlinExpectActualNode(node, kind)) {
|
|
66
|
+
context.losses.push(kotlinUnsupportedSemanticLoss(context.input, id, span, context.options, {
|
|
67
|
+
nodeKind: kind,
|
|
68
|
+
feature: 'expect-actual',
|
|
69
|
+
message: 'Kotlin expect/actual syntax was imported; matching platform declarations requires multiplatform build evidence.'
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
if (kotlinCoroutineNode(node, kind)) {
|
|
73
|
+
context.losses.push(kotlinUnsupportedSemanticLoss(context.input, id, span, context.options, {
|
|
74
|
+
nodeKind: kind,
|
|
75
|
+
feature: 'coroutine',
|
|
76
|
+
message: 'Kotlin coroutine syntax was imported; suspend lowering, scheduling, and effect semantics require host compiler/runtime evidence.'
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
if (kotlinContractNode(kind)) {
|
|
80
|
+
context.losses.push(kotlinUnsupportedSemanticLoss(context.input, id, span, context.options, {
|
|
81
|
+
nodeKind: kind,
|
|
82
|
+
feature: 'contract',
|
|
83
|
+
message: 'Kotlin contract syntax was imported; data-flow effects require Analysis API or compiler evidence.'
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
if (kotlinCompilerPluginAnnotationNode(node, kind) && !context.options.compilerPluginEvidence) {
|
|
87
|
+
context.losses.push({
|
|
88
|
+
id: `loss_${idFragment(id)}_kotlin_compiler_plugin_semantics`,
|
|
89
|
+
severity: 'warning',
|
|
90
|
+
phase: 'parse',
|
|
91
|
+
sourceFormat: context.input.language,
|
|
92
|
+
kind: 'metaprogramming',
|
|
93
|
+
message: 'Kotlin compiler-plugin-style annotation was imported; generated declarations and transformed semantics require compiler plugin evidence.',
|
|
94
|
+
span,
|
|
95
|
+
nodeId: id,
|
|
96
|
+
metadata: {
|
|
97
|
+
parser: context.options.parser,
|
|
98
|
+
astFormat: context.options.astFormat,
|
|
99
|
+
nodeKind: kind,
|
|
100
|
+
annotations: kotlinPsiAnnotationNames(node)
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (kotlinGeneratedCodeMarker(node, kind)) {
|
|
105
|
+
context.losses.push(kotlinGeneratedCodeLoss(context.input, id, span, context.options, { nodeKind: kind }));
|
|
106
|
+
}
|
|
107
|
+
return id;
|
|
108
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{isPythonAstNode}from'./isPythonAstNode.js';import{nativeNodeId}from'./nativeNodeId.js';import{numberOrUndefined}from'./numberOrUndefined.js';import{primitivePythonAstFields}from'./primitivePythonAstFields.js';import{pythonAstChildEntries}from'./pythonAstChildEntries.js';import{pythonAstDeclaration}from'./pythonAstDeclaration.js';import{pythonAstKind}from'./pythonAstKind.js';import{pythonAstNodeValue}from'./pythonAstNodeValue.js';import{spanFromPythonAstNode}from'./spanFromPythonAstNode.js';
|
|
2
|
+
export function visitPythonAstNode(node, context, propertyPath) {
|
|
3
|
+
if (!isPythonAstNode(node) || context.truncated) return undefined;
|
|
4
|
+
if (context.objectIds.has(node)) return context.objectIds.get(node);
|
|
5
|
+
if (context.counter >= context.maxNodes) {
|
|
6
|
+
context.truncated = true;
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const kind = pythonAstKind(node);
|
|
10
|
+
const span = spanFromPythonAstNode(node, context.input);
|
|
11
|
+
const id = nativeNodeId(context, kind, { start: { line: span?.startLine, column: span?.startColumn } }, propertyPath);
|
|
12
|
+
context.objectIds.set(node, id);
|
|
13
|
+
if (!context.rootId) context.rootId = id;
|
|
14
|
+
const children = [];
|
|
15
|
+
for (const [field, value] of pythonAstChildEntries(node)) {
|
|
16
|
+
if (Array.isArray(value)) {
|
|
17
|
+
value.forEach((entry, index) => {
|
|
18
|
+
const childId = visitPythonAstNode(entry, context, `${propertyPath}.${field}[${index}]`);
|
|
19
|
+
if (childId) children.push(childId);
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
const childId = visitPythonAstNode(value, context, `${propertyPath}.${field}`);
|
|
23
|
+
if (childId) children.push(childId);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const declaration = pythonAstDeclaration(node, kind, id, context.input);
|
|
27
|
+
const nativeNode = {
|
|
28
|
+
id,
|
|
29
|
+
kind,
|
|
30
|
+
languageKind: `${context.input.language}.${kind}`,
|
|
31
|
+
span,
|
|
32
|
+
value: declaration?.name ?? pythonAstNodeValue(node),
|
|
33
|
+
fields: primitivePythonAstFields(node, kind),
|
|
34
|
+
children,
|
|
35
|
+
metadata: {
|
|
36
|
+
astFormat: context.options.astFormat,
|
|
37
|
+
propertyPath,
|
|
38
|
+
lineno: numberOrUndefined(node.lineno ?? node.line),
|
|
39
|
+
colOffset: numberOrUndefined(node.col_offset ?? node.colOffset),
|
|
40
|
+
endLineno: numberOrUndefined(node.end_lineno ?? node.endLine),
|
|
41
|
+
endColOffset: numberOrUndefined(node.end_col_offset ?? node.endColOffset)
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
context.nodes[id] = nativeNode;
|
|
45
|
+
if (declaration) context.declarations.push({ ...declaration, nativeNode });
|
|
46
|
+
return id;
|
|
47
|
+
}
|