SNRK-71: buildDependencyGraph scratch is added

This commit is contained in:
liubar.pa 2023-05-01 21:23:09 +03:00
parent fd45104a7e
commit 1db2afce12
2 changed files with 24 additions and 2 deletions

View File

@ -9,7 +9,25 @@ val DEFAULT_DOCUMENT_ROOT = "main.md"
public suspend fun buildDocument(documentPath: String) {
val documentDirectory: Directory = LocalDirectory(documentPath)
val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT)
val dependencyGraph = buildDependencyGraph(documentDirectory)
TODO() /*resolving of dependencies*/
}
public suspend fun buildDependencyGraph(root: Directory) : DependencyGraph {
// val rootDcoument = root.get(DEFAULT_DOCUMENT_ROOT)
// val filesToParse: Queue<FileReader> = LinkedList<FileReader>(listOf(root))
// var documentName = "."
// val nodes = HashMap<FileName, DependencyGraphNode>()
// while (!filesToParse.isEmpty())
// {
// dependencyGraphNode = buildDependencyNode(filesToParse.remove())
// nodes.put()
// }
TODO()
}

View File

@ -1,5 +1,9 @@
package documentBuilder
public suspend fun parseMd(mdFile: ByteArray): DependencyGraphNode {
public suspend fun parseMd(mdFile: ByteArray): MdAstRoot {
TODO()
}
public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode {
TODO()
}