blob: 2fd3b326efd964b9e0241eeb56830b3f0ed77f08 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
(.using
[library
[lux (.except parameter)
["$" documentation (.only documentation:)]
[data
[text (.only \n)
["%" \\format (.only format)]]]
[macro
["[0]" template]]]]
[\\library
["[0]" /]])
(documentation: (/.Parser it)
"A command-line interface parser.")
(documentation: /.result
"Executes the parser and verifies that all inputs are processed."
[(result parser inputs)])
(documentation: /.any
"Just returns the next input without applying any logic.")
(documentation: /.parse
"Parses the next input with a parsing function."
[(parse parser)])
(documentation: /.this
"Checks that a token is in the inputs."
[(this reference)])
(documentation: /.somewhere
"Given a parser, tries to parse it somewhere in the inputs (i.e. not necessarily parsing the immediate inputs)."
[(somewhere cli)])
(documentation: /.end
"Ensures there are no more inputs.")
(documentation: /.named
"Parses a named parameter and yields its value."
[(named name value)])
(documentation: /.parameter
"Parses a parameter that can have either a short or a long name."
[(parameter [short long] value)])
(.def: .public documentation
(.List $.Module)
($.module /._
""
[..Parser
..result
..any
..parse
..this
..somewhere
..end
..named
..parameter]
[]))
|