Kdl Module
The KDL front-end. Produces the format-neutral `Node` tree from KDL
2.0 text on KdlSharp's token reader — the reader does all the
parsing, and node positions come from the reader's own line and
column, converted to character offsets against the source:
- a node is `kind args? props? { children }?`
- `name=value` pairs are properties (the layout channel); bare values
are positional args
- a node whose kind is `element` carries its template name as the
first word argument (moved to `Node.Label`)
- slashdash `/-` comments out a whole node — parsed and dropped, so a
bad body still errors
KDL's typed literals (hex, underscores, quoted numbers) have no XML
equivalent; XML attributes type by content. Unclosed and unbalanced
braces fail visibly, and adapter failures carry the reader's line
and column.
Functions and values
| Function or value |
Description
|
|
Parses one KDL markup document into its root nodes (one root per line; `map` is the usual one). An integer past the int32 range becomes a decimal, matching the XML front-end's typing. Failure messages carry the reader's line and column; node positions feed `Markup.where`, so resolution errors point at the authoring line. An empty document parses to zero roots.
|
Mibo