aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/control/parser/environment.lux
blob: 5c72cfc14d0e2a3e63c24f625fa55f3937bbb090 (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
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

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

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

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