aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/Content.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Model/Content.kt b/src/Model/Content.kt
index ca5dd49b..d343c648 100644
--- a/src/Model/Content.kt
+++ b/src/Model/Content.kt
@@ -26,9 +26,16 @@ public open class ContentBlock() : ContentNode() {
children.hashCode()
}
+enum class IdentifierKind {
+ TypeName
+ ParameterName
+ AnnotationName
+ Other
+}
+
public data class ContentText(val text: String) : ContentNode()
public data class ContentKeyword(val text: String) : ContentNode()
-public data class ContentIdentifier(val text: String) : ContentNode()
+public data class ContentIdentifier(val text: String, val kind: IdentifierKind = IdentifierKind.Other) : ContentNode()
public data class ContentSymbol(val text: String) : ContentNode()
public object ContentNonBreakingSpace: ContentNode()
@@ -89,7 +96,7 @@ fun content(body: ContentBlock.() -> Unit): ContentBlock {
fun ContentBlock.text(value: String) = append(ContentText(value))
fun ContentBlock.keyword(value: String) = append(ContentKeyword(value))
fun ContentBlock.symbol(value: String) = append(ContentSymbol(value))
-fun ContentBlock.identifier(value: String) = append(ContentIdentifier(value))
+fun ContentBlock.identifier(value: String, kind: IdentifierKind = IdentifierKind.Other) = append(ContentIdentifier(value, kind))
fun ContentBlock.nbsp() = append(ContentNonBreakingSpace)
fun ContentBlock.link(to: DocumentationNode, body: ContentBlock.() -> Unit) {