aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/macro/syntax/definition.lux
blob: 3a97fc37d91b5e5c9b30d18f2512cac1cc4040ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(.module:
  [library
   [lux (#- Definition)
    ["$" documentation (#+ documentation:)]
    [data
     [text
      ["%" format (#+ format)]]
     [collection
      ["." list]]]]]
  [\\library
   ["." /]])

(documentation: /.Definition
  "Syntax for a constant definition.")

(documentation: /.parser
  "A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
  [(parser compiler)])

(documentation: /.typed
  "Only works for typed definitions."
  [(typed compiler)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Definition
             ..parser
             ..typed
             ($.default /.equivalence)
             ($.default /.lacks_type)
             ($.default /.format)]
            []))