DOCS: Add some doc strings for the doc function.

This commit is contained in:
Jeremy Wall 2019-04-19 19:23:32 -05:00
parent 3385c775d3
commit f12d264778

View File

@ -45,6 +45,10 @@ let is_tag = func(t) => schema.shaped{val=t, shape={name=""}, partial=true};
// validates that a node is either a valid tag or a text node.
let validate_node = func(node) => schema.any{val=node, types=["", {name = ""}], partial=true};
// Make an xml doc from a root node.
//
// The root node must be a valid xml node. Either a text or an
// xml node.
let doc = func(root) => select validate_node(root), {
true = {
root = root,