File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,18 @@ synopsis: Interface macros for parser definition and option access.
3
3
authors: David Lichteblau <lichteblau@fhtw-berlin.de>
4
4
copyright: See LICENSE file in this distribution.
5
5
6
+ // TODO(cgay): Two improvements for synopsis
7
+ // 1. We have almost all the information we need to automatically generate
8
+ // the usage line: "test [options] file...". The `positional-arguments`
9
+ // clause needs a `name:` option so the dylan name needn't be used.
10
+ // 2. It's odd that `description` is a keyword argument to the synopsis clause
11
+ // when the description is the one thing that can't be auto-generated and
12
+ // should always be specified. Make it its own `description` clause and
13
+ // change `synopsis` to `usage`, which should usually not be needed.
14
+ //
15
+ // TODO(cgay): Support for min/max number of positional args. The parser already
16
+ // supports them. (This will improve `usage` auto-generation too.)
17
+
6
18
// Introduction
7
19
// ============
8
20
//
@@ -137,6 +149,8 @@ copyright: See LICENSE file in this distribution.
137
149
// --version Show version
138
150
//
139
151
152
+ // Note: add the `traced` adjective to the `define macro` definitions to get
153
+ // some help from the compiler when debugging these hairy macros.
140
154
141
155
// Macro COMMAND-LINE-DEFINER--exported
142
156
// =======================================
@@ -262,7 +276,7 @@ define macro defcmdline-class
262
276
{ (?usage:*) ... }
263
277
=> { ... }
264
278
{ } => { }
265
-
279
+
266
280
default:
267
281
{ ?:expression }
268
282
=> { default: ?expression }
You can’t perform that action at this time.
0 commit comments