-
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.
Upgrade to the most recent dev version:
* Get rid of swift-export-experimental repo * Fix swift export API usages * Add a bit of tests on strings and chars
- Loading branch information
1 parent
fd2b6c9
commit acd57be
Showing
9 changed files
with
94 additions
and
46 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
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
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: 15 additions & 4 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,31 +1,42 @@ | ||
import org.jetbrains.kotlin.analysis.project.structure.KtModule | ||
import org.jetbrains.kotlin.analysis.api.projectStructure.KaModule | ||
import org.jetbrains.kotlin.name.FqName | ||
import org.jetbrains.kotlin.sir.SirModule | ||
|
||
import org.jetbrains.kotlin.sir.providers.SirSession | ||
import org.jetbrains.kotlin.sir.providers.SirTrampolineDeclarationsProvider | ||
import org.jetbrains.kotlin.sir.providers.SirTypeProvider | ||
import org.jetbrains.kotlin.sir.providers.impl.* | ||
import org.jetbrains.kotlin.sir.providers.utils.UnsupportedDeclarationReporter | ||
import org.jetbrains.sir.lightclasses.SirDeclarationFromKtSymbolProvider | ||
|
||
internal class PlaygroundSirSession( | ||
ktModule: KtModule, | ||
ktModule: KaModule, | ||
moduleForPackageEnums: SirModule, | ||
unsupportedDeclarationReporter: UnsupportedDeclarationReporter, | ||
targetPackageFqName: FqName?, | ||
) : SirSession { | ||
override val declarationNamer = SirDeclarationNamerImpl() | ||
override val enumGenerator = SirEnumGeneratorImpl() | ||
override val moduleProvider = SirSingleModuleProvider("Playground") | ||
override val declarationProvider = CachingSirDeclarationProvider( | ||
declarationsProvider = SirDeclarationFromKtSymbolProvider( | ||
ktModule = ktModule, | ||
sirSession = sirSession, | ||
) | ||
) | ||
override val enumGenerator = SirEnumGeneratorImpl(moduleForPackageEnums) | ||
override val parentProvider = SirParentProviderImpl( | ||
sirSession = sirSession, | ||
packageEnumGenerator = enumGenerator, | ||
) | ||
override val typeProvider = SirTypeProviderImpl( | ||
errorTypeStrategy = SirTypeProvider.ErrorTypeStrategy.ErrorType, | ||
unsupportedTypeStrategy = SirTypeProvider.ErrorTypeStrategy.ErrorType, | ||
sirSession = sirSession, | ||
) | ||
override val visibilityChecker = SirVisibilityCheckerImpl() | ||
override val visibilityChecker = SirVisibilityCheckerImpl(unsupportedDeclarationReporter) | ||
override val childrenProvider = SirDeclarationChildrenProviderImpl( | ||
sirSession = sirSession, | ||
) | ||
|
||
override val trampolineDeclarationsProvider: SirTrampolineDeclarationsProvider = SirTrampolineDeclarationsProviderImpl(sirSession, targetPackageFqName) | ||
} |
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