diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/documentation/lux/control/parser/tree.lux | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/control/parser/tree.lux b/stdlib/source/documentation/lux/control/parser/tree.lux new file mode 100644 index 000000000..3c5cf1bf7 --- /dev/null +++ b/stdlib/source/documentation/lux/control/parser/tree.lux @@ -0,0 +1,72 @@ +(.module: + [library + [lux #* + ["$" documentation (#+ documentation:)] + [data + [text (#+ \n) + ["%" format (#+ format)]]] + [macro + ["." template]]]] + [\\library + ["." /]]) + +(documentation: /.Parser + "A parser of arbitrary trees.") + +(documentation: /.result' + "Applies the parser against a tree zipper." + [(result' parser zipper)]) + +(documentation: /.result + "Applies the parser against a tree." + [(result parser tree)]) + +(documentation: /.value + "Yields the value inside the current tree node.") + +(template [<name> <doc>] + [(documentation: <name> + <doc>)] + + [/.down "Move down."] + [/.up "Move up."] + + [/.right "Move to the right."] + [/.rightmost "Move to the rightmost node."] + + [/.left "Move to the left."] + [/.leftmost "Move to the leftmost node."] + + [/.next "Move to the next node."] + [/.end "Move to the last node."] + + [/.previous "Move to the previous node."] + [/.start "Move to the root node."] + ) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [..Parser + ..result' + ..result + ..value + + ..down + ..up + + ..right + ..rightmost + + ..left + ..leftmost + + ..next + ..end + + ..previous + ..start + + ($.default /.cannot_move_further)] + [])) |