aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/KotlinLanguageService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-26 17:11:51 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-26 17:11:51 +0100
commitf9b7ea8fa9da20f6758788dd4b2b24820825bc5e (patch)
tree730f9507c8e53727f9fbd79275ce869de88c0d43 /src/Kotlin/KotlinLanguageService.kt
parentf8704c63e7ba267beb9370bc22ff96dde75b0f9f (diff)
downloaddokka-f9b7ea8fa9da20f6758788dd4b2b24820825bc5e.tar.gz
dokka-f9b7ea8fa9da20f6758788dd4b2b24820825bc5e.tar.bz2
dokka-f9b7ea8fa9da20f6758788dd4b2b24820825bc5e.zip
variance modifiers for type projections are separate modifier nodes, not part of the type name
Diffstat (limited to 'src/Kotlin/KotlinLanguageService.kt')
-rw-r--r--src/Kotlin/KotlinLanguageService.kt15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt
index a4f62c3f..ab1f7016 100644
--- a/src/Kotlin/KotlinLanguageService.kt
+++ b/src/Kotlin/KotlinLanguageService.kt
@@ -104,6 +104,7 @@ class KotlinLanguageService : LanguageService {
renderType(typeArguments.last())
return
}
+ renderSingleModifier(node)
renderLinked(node) { identifier(it.name) }
if (typeArguments.any()) {
symbol("<")
@@ -125,11 +126,7 @@ class KotlinLanguageService : LanguageService {
}
private fun ContentBlock.renderTypeParameter(node: DocumentationNode) {
- val modifier = node.details(DocumentationNode.Kind.Modifier).singleOrNull()
- if (modifier != null) {
- keyword(modifier.name)
- nbsp()
- }
+ renderSingleModifier(node)
identifier(node.name)
@@ -144,6 +141,14 @@ class KotlinLanguageService : LanguageService {
}
}
+ private fun ContentBlock.renderSingleModifier(node: DocumentationNode) {
+ val modifier = node.details(DocumentationNode.Kind.Modifier).singleOrNull()
+ if (modifier != null) {
+ keyword(modifier.name)
+ nbsp()
+ }
+ }
+
private fun ContentBlock.renderParameter(node: DocumentationNode) {
renderAnnotationsForNode(node)
identifier(node.name)