(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    [text (.only \n)
     ["%" \\format (.only format)]]
    [collection
     ["[0]" list]]]]]
 [\\library
  ["[0]" /]])

(def .public documentation
  (List $.Documentation)
  (let [statement (list ($.definition /.Statement)
                        ($.definition /.Loop)
                        ($.definition /.Label)
                        ($.definition /.then)
                        ($.definition /.function_definition)
                        ($.definition /.statement)
                        ($.definition /.use_strict)
                        ($.definition /.declare)
                        ($.definition /.define)
                        ($.definition /.set)
                        ($.definition /.throw)
                        ($.definition /.return)
                        ($.definition /.delete)
                        ($.definition /.if)
                        ($.definition /.when)
                        ($.definition /.while)
                        ($.definition /.do_while)
                        ($.definition /.try)
                        ($.definition /.for)
                        ($.definition /.label)
                        ($.definition /.with_label)
                        ($.definition /.break)
                        ($.definition /.break_at)
                        ($.definition /.continue)
                        ($.definition /.continue_at)
                        ($.definition /.comment)
                        ($.definition /.switch))
        arithmetic (list ($.definition /.=)
                         ($.definition /.<)
                         ($.definition /.<=)
                         ($.definition /.>)
                         ($.definition /.>=)
                         ($.definition /.+)
                         ($.definition /.-)
                         ($.definition /.*)
                         ($.definition /./)
                         ($.definition /.%)
                         ($.definition /.left_shift)
                         ($.definition /.arithmetic_right_shift)
                         ($.definition /.logic_right_shift)
                         ($.definition /.or)
                         ($.definition /.and)
                         ($.definition /.bit_xor)
                         ($.definition /.bit_or)
                         ($.definition /.bit_and)
                         ($.definition /.not)
                         ($.definition /.bit_not)
                         ($.definition /.opposite))]
    (list.partial ($.module /._
                            "")

                  ($.definition /.Code)
                  ($.definition /.code)
                  ($.definition /.Expression)
                  ($.definition /.Computation)
                  ($.definition /.Location)
                  ($.definition /.Var)
                  ($.definition /.Access)
                  ($.definition /.Literal)
                  ($.definition /.null)
                  ($.definition /.undefined)
                  ($.definition /.boolean)
                  ($.definition /.number)
                  ($.definition /.string)
                  ($.definition /.array)
                  ($.definition /.var)
                  ($.definition /.at)
                  ($.definition /.the)
                  ($.definition /.apply)
                  ($.definition /.do)
                  ($.definition /.object)
                  ($.definition /.,)
                  ($.definition /.function)
                  ($.definition /.closure)
                  ($.definition /.to_i32)
                  ($.definition /.i32)
                  ($.definition /.int)
                  ($.definition /.?)
                  ($.definition /.type_of)
                  ($.definition /.new)
                  ($.definition /.++)
                  ($.definition /.--)
                  ($.definition /.not_a_number?)

                  (list.together
                   (list statement
                         arithmetic))
                  )))
