Fix review findings, add DB scheme for comments

This commit is contained in:
Tamas Vajk
2021-09-16 14:31:19 +02:00
committed by Ian Lynagh
parent c23472d736
commit 48d019ebbe
3 changed files with 72 additions and 47 deletions

View File

@@ -152,9 +152,6 @@ fun <T> fakeLabel(): Label<T> {
}
class KotlinFileExtractor(val logger: FileLogger, val tw: FileTrapWriter, val file: IrFile) {
private val commentExtractor: CommentExtractor = CommentExtractor(logger, tw, file, this)
val fileClass by lazy {
extractFileClass(file)
}
@@ -164,10 +161,9 @@ class KotlinFileExtractor(val logger: FileLogger, val tw: FileTrapWriter, val fi
val pkgId = extractPackage(pkg)
tw.writeCupackage(id, pkgId)
file.declarations.map { extractDeclaration(it, Optional.empty()) }
commentExtractor.extract()
CommentExtractor(this).extract()
}
fun extractFileClass(f: IrFile): Label<out DbClass> {
val fileName = f.fileEntry.name
val pkg = f.fqName.asString()