Created
June 12, 2021 20:18
-
-
Save drawers/f88ec96ab13d958380a529d5782722c0 to your computer and use it in GitHub Desktop.
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
class IntSummableProcessor( | |
private val options: Map<String, String>, | |
private val codeGenerator: CodeGenerator, | |
private val logger: KSPLogger | |
) : SymbolProcessor { | |
private lateinit var intType: KSType | |
override fun process(resolver: Resolver): List<KSAnnotated> { | |
intType = resolver.builtIns.intType | |
val symbols = resolver.getSymbolsWithAnnotation(IntSummable::class.qualifiedName!!) | |
val unableToProcess = symbols.filterNot { it.validate() } | |
symbols.filter { it is KSClassDeclaration && it.validate() } | |
.forEach { it.accept(Visitor(), Unit) } | |
return unableToProcess.toList() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment