diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-04 17:51:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 17:51:28 +0200 |
commit | 0be397336e89782cda94c8bf55005a2be9abecde (patch) | |
tree | ad6b13828bd18a26b3de26b447b88ab4b2e8719f /plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt | |
parent | ddcaa1864ffc26e8482770ad2c16ba424af8a0ac (diff) | |
download | dokka-0be397336e89782cda94c8bf55005a2be9abecde.tar.gz dokka-0be397336e89782cda94c8bf55005a2be9abecde.tar.bz2 dokka-0be397336e89782cda94c8bf55005a2be9abecde.zip |
Reintroduce removed analysis APIs with a deprecation message (#3104)
Diffstat (limited to 'plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt b/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt new file mode 100644 index 00000000..424c9492 --- /dev/null +++ b/plugins/base/src/main/kotlin/deprecated/ParsersDeprecatedAPI.kt @@ -0,0 +1,38 @@ +@file:Suppress("PackageDirectoryMismatch", "DEPRECATION_ERROR", "DeprecatedCallableAddReplaceWith", "unused") + +package org.jetbrains.dokka.base.parsers + +import org.jetbrains.dokka.base.deprecated.ANALYSIS_API_DEPRECATION_MESSAGE +import org.jetbrains.dokka.base.deprecated.AnalysisApiDeprecatedError +import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.model.doc.DocTag +import org.jetbrains.dokka.model.doc.DocumentationNode +import org.jetbrains.dokka.model.doc.TagWrapper + +@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) +abstract class Parser { + @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) + open fun parseStringToDocNode(extractedString: String): DocTag = throw AnalysisApiDeprecatedError() + + @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) + open fun preparse(text: String): String = throw AnalysisApiDeprecatedError() + + @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) + open fun parseTagWithBody(tagName: String, content: String): TagWrapper = throw AnalysisApiDeprecatedError() +} + +@Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) +open class MarkdownParser( + private val externalDri: (String) -> DRI?, + private val kdocLocation: String?, +) : Parser() { + companion object { + @Deprecated(message = ANALYSIS_API_DEPRECATION_MESSAGE, level = DeprecationLevel.ERROR) + fun parseFromKDocTag( + @Suppress("UNUSED_PARAMETER") kDocTag: Any?, + @Suppress("UNUSED_PARAMETER") externalDri: (String) -> DRI?, + @Suppress("UNUSED_PARAMETER") kdocLocation: String?, + @Suppress("UNUSED_PARAMETER") parseWithChildren: Boolean = true + ): DocumentationNode = throw AnalysisApiDeprecatedError() + } +} |