diff options
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/DocumentationReference.kt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Model/DocumentationReference.kt b/src/Model/DocumentationReference.kt index d7ad5f9e..4bc819f6 100644 --- a/src/Model/DocumentationReference.kt +++ b/src/Model/DocumentationReference.kt @@ -15,5 +15,14 @@ public data class DocumentationReference(val from: DocumentationNode, val to: Do } } - - +class PendingDocumentationReference(val lazyNodeFrom: () -> DocumentationNode?, + val lazyNodeTo: () -> DocumentationNode?, + val kind: DocumentationReference.Kind) { + fun resolve() { + val fromNode = lazyNodeFrom() + val toNode = lazyNodeTo() + if (fromNode != null && toNode != null) { + fromNode.addReferenceTo(toNode, kind) + } + } +} |