aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/control/parser/environment.lux
blob: f4961a0d4d77e12090ccc89a758c37c94912bbd1 (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
35
36
37
38
39
40
41
42
43
44
45
(.module:
  [library
   [lux #*
    ["$" documentation (#+ documentation:)]
    [data
     [text (#+ \n)
      ["%" format (#+ format)]]]
    [macro
     ["." template]]]]
  [\\library
   ["." /]])

(documentation: /.Property
  "A property in the environment.")

(documentation: /.Environment
  "An abstraction for environment variables of a program.")

(documentation: /.Parser
  "A parser of environment variables of a program.")

(documentation: /.empty
  "An empty environment.")

(documentation: /.property
  ""
  [(property name)])

(documentation: /.result
  (format "Executes a parser against the given environment variables."
          \n "Does not check whether all environment variables were parsed, since they're usually an open set.")
  [(result parser environment)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Property
             ..Environment
             ..Parser
             ..empty
             ..property
             ..result
             ($.default /.unknown_property)]
            []))