Kotlin: Populate numfiles

This commit is contained in:
Ian Lynagh
2022-10-07 17:46:07 +01:00
parent 10eb548156
commit bca2586903
5 changed files with 143 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ import kotlin.collections.ArrayList
open class KotlinFileExtractor(
override val logger: FileLogger,
override val tw: FileTrapWriter,
val linesOfCode: LinesOfCode?,
val filePath: String,
dependencyCollector: OdasaOutput.TrapFileManager?,
externalClassExtractor: ExternalDeclExtractor,
@@ -90,6 +91,8 @@ open class KotlinFileExtractor(
if (!declarationStack.isEmpty()) {
logger.errorElement("Declaration stack is not empty after processing the file", file)
}
linesOfCode?.linesOfCodeInFile(id)
}
}
@@ -459,6 +462,8 @@ open class KotlinFileExtractor(
extractClassModifiers(c, id)
extractClassSupertypes(c, id, inReceiverContext = true) // inReceiverContext = true is specified to force extraction of member prototypes of base types
linesOfCode?.linesOfCodeInDeclaration(c, id)
return id
}
}
@@ -1038,6 +1043,8 @@ open class KotlinFileExtractor(
addModifiers(id, "suspend")
}
linesOfCode?.linesOfCodeInDeclaration(f, id)
return id
}
}