diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 8186b23..20243b0 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -14,5 +14,29 @@ public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { } public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode { + val treeRoot = parseMd(mdFile) + val dependencies = mutableListOf() + + fillDependencies(treeRoot, dependencies) + + return DependencyGraphNode(treeRoot, dependencies) +} + +private suspend fun fillDependencies( + currentNode: MdAstElement, + dependencies: MutableList) { + // when (currentNode) { + // is MdAstParent -> { + // val iterator = currentNode.children.listIterator() + + // while (iterator.hasNext()) { + + + // iterator.next() + // } + + // } + // else -> {} + // } TODO() } \ No newline at end of file