1 # oil-builtin-argparse
2 #
3 # Some thoughts before writing code. Hm can we do this entirely in user code, not as a builtin?
4 #
5 # I think it modifies OPT
6
7
8 #### Argparse Prototype
9
10 hay define argparse
11
12 # Oops, we're running into this problem ...
13
14 hay define argparse/flag
15
16 # This means we need expr.Type objects?
17
18 argparse foo {
19 flag -v --verbose (Bool) {
20 help = 'fo'
21 default = true
22 }
23
24 flag -h --help (Bool) {
25 help = 'fo'
26 }
27
28 arg name (pos = 1) {
29 foo
30 }
31 }
32
33 ## STDOUT:
34 TODO
35 ## END