(.using
  [library
   [lux "*"
    ["$" documentation {"+" documentation:}]
    [data
     [text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: (/.Parser it)
  "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)]
            []))
