Skip to content

Instantly share code, notes, and snippets.

@ShikaSD
Last active July 26, 2020 18:34
Show Gist options
  • Save ShikaSD/b52fc5b77c6496b19dc713d9bdbeb833 to your computer and use it in GitHub Desktop.
Save ShikaSD/b52fc5b77c6496b19dc713d9bdbeb833 to your computer and use it in GitHub Desktop.
sealed class HtmlNode {
class Tag(val tag: String): HtmlNode() {
private val children: List<HtmlNode> = mutableListOf()
// wordy implementations copy-pasted from compose
fun insert(index: Int, instance: HtmlNode)
fun move(from: Int, to: Int, count: Int)
fun remove(index: Int, count: Int)
}
class Text() : HtmlNode() {
var text: String? = null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment