aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/parsers/moduleAndPackage
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-09-16 16:36:54 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-27 03:15:02 +0100
commitc8a83153a88fe6f5b50b6f459295421f90a21583 (patch)
tree4ce52c287dde3a8303549287ce67e58174d9f9fc /plugins/base/src/main/kotlin/parsers/moduleAndPackage
parent585178984228a9c2e5bd2af9b675094ac6e3fa46 (diff)
downloaddokka-c8a83153a88fe6f5b50b6f459295421f90a21583.tar.gz
dokka-c8a83153a88fe6f5b50b6f459295421f90a21583.tar.bz2
dokka-c8a83153a88fe6f5b50b6f459295421f90a21583.zip
Extracting dokka generation to the dedicated extension point
Diffstat (limited to 'plugins/base/src/main/kotlin/parsers/moduleAndPackage')
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentation.kt2
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationFragment.kt2
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt4
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt2
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt2
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt4
6 files changed, 8 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentation.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentation.kt
index 5139c872..ee67fad1 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentation.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentation.kt
@@ -2,7 +2,7 @@ package org.jetbrains.dokka.base.parsers.moduleAndPackage
import org.jetbrains.dokka.model.doc.DocumentationNode
-internal data class ModuleAndPackageDocumentation(
+data class ModuleAndPackageDocumentation(
val name: String,
val classifier: Classifier,
val documentation: DocumentationNode
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationFragment.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationFragment.kt
index fa99a8e2..06fef72c 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationFragment.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationFragment.kt
@@ -2,7 +2,7 @@ package org.jetbrains.dokka.base.parsers.moduleAndPackage
import org.jetbrains.dokka.base.parsers.moduleAndPackage.ModuleAndPackageDocumentation.*
-internal data class ModuleAndPackageDocumentationFragment(
+data class ModuleAndPackageDocumentationFragment(
val name: String,
val classifier: Classifier,
val documentation: String,
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
index 64441447..afdcc43f 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
@@ -17,7 +17,7 @@ import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
-internal fun interface ModuleAndPackageDocumentationParsingContext {
+fun interface ModuleAndPackageDocumentationParsingContext {
fun markdownParserFor(fragment: ModuleAndPackageDocumentationFragment): MarkdownParser
}
@@ -27,7 +27,7 @@ internal fun ModuleAndPackageDocumentationParsingContext.parse(
return markdownParserFor(fragment).parse(fragment.documentation)
}
-internal fun ModuleAndPackageDocumentationParsingContext(
+fun ModuleAndPackageDocumentationParsingContext(
logger: DokkaLogger,
facade: DokkaResolutionFacade? = null
) = ModuleAndPackageDocumentationParsingContext { fragment ->
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt
index 90dc9ca8..9514adb4 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt
@@ -2,7 +2,7 @@ package org.jetbrains.dokka.base.parsers.moduleAndPackage
import java.io.File
-internal abstract class ModuleAndPackageDocumentationSource {
+abstract class ModuleAndPackageDocumentationSource {
abstract val sourceDescription: String
abstract val documentation: String
override fun toString(): String = sourceDescription
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
index a2876308..5ef9d7ef 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
@@ -2,7 +2,7 @@
package org.jetbrains.dokka.base.parsers.moduleAndPackage
-internal fun parseModuleAndPackageDocumentation(
+fun parseModuleAndPackageDocumentation(
context: ModuleAndPackageDocumentationParsingContext,
fragment: ModuleAndPackageDocumentationFragment
): ModuleAndPackageDocumentation {
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt
index 7dcaccfa..d193ec0a 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt
@@ -4,11 +4,11 @@ import org.jetbrains.dokka.base.parsers.moduleAndPackage.ModuleAndPackageDocumen
import java.io.File
-internal fun parseModuleAndPackageDocumentationFragments(source: File): List<ModuleAndPackageDocumentationFragment> {
+fun parseModuleAndPackageDocumentationFragments(source: File): List<ModuleAndPackageDocumentationFragment> {
return parseModuleAndPackageDocumentationFragments(ModuleAndPackageDocumentationFile(source))
}
-internal fun parseModuleAndPackageDocumentationFragments(
+fun parseModuleAndPackageDocumentationFragments(
source: ModuleAndPackageDocumentationSource
): List<ModuleAndPackageDocumentationFragment> {
val fragmentStrings = source.documentation.split(Regex("(|^)#\\s*(?=(Module|Package))"))