mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
DOCS: Add some doc strings for the doc function.
This commit is contained in:
parent
3385c775d3
commit
f12d264778
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user