-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to the latest Swift export version
- Loading branch information
1 parent
d331d72
commit 0641af2
Showing
5 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 8 additions & 11 deletions
19
swift-export-playground/src/main/kotlin/PlaygroundSirSession.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession | ||
import org.jetbrains.kotlin.analysis.project.structure.KtModule | ||
import org.jetbrains.kotlin.sir.providers.SirSession | ||
import org.jetbrains.kotlin.sir.providers.SirTypeProvider | ||
import org.jetbrains.kotlin.sir.providers.impl.* | ||
import org.jetbrains.sir.lightclasses.SirDeclarationFromKtSymbolProvider | ||
|
||
internal class PlaygroundSirSession( | ||
private val ktAnalysisSession: KtAnalysisSession, | ||
ktModule: KtModule, | ||
) : SirSession { | ||
override val declarationNamer = SirDeclarationNamerImpl() | ||
override val enumGenerator = SirEnumGeneratorImpl() | ||
override val moduleProvider = SirSingleModuleProvider("Playground", "KotlinBridges") | ||
override val moduleProvider = SirSingleModuleProvider("Playground") | ||
override val declarationProvider = CachingSirDeclarationProvider( | ||
declarationsProvider = SirDeclarationFromKtSymbolProvider( | ||
ktAnalysisSession = ktAnalysisSession, | ||
ktModule = ktModule, | ||
sirSession = sirSession, | ||
) | ||
) | ||
override val parentProvider = SirParentProviderImpl( | ||
ktAnalysisSession = ktAnalysisSession, | ||
sirSession = sirSession, | ||
) | ||
override val typeProvider = SirTypeProviderImpl( | ||
ktAnalysisSession = ktAnalysisSession, | ||
sirSession = sirSession, | ||
) | ||
override val visibilityChecker = SirVisibilityCheckerImpl( | ||
ktAnalysisSession = ktAnalysisSession, | ||
errorTypeStrategy = SirTypeProvider.ErrorTypeStrategy.ErrorType, | ||
unsupportedTypeStrategy = SirTypeProvider.ErrorTypeStrategy.ErrorType, | ||
sirSession = sirSession, | ||
) | ||
override val visibilityChecker = SirVisibilityCheckerImpl() | ||
override val childrenProvider = SirDeclarationChildrenProviderImpl( | ||
ktAnalysisSession = ktAnalysisSession, | ||
sirSession = sirSession, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters