Lines Matching refs:argument

72 (invalid argument), neither will `--apple:fruit` (fruit is not an int) nor `--orange:1234` (1234 is
77 The 'Define' method takes one or more aliases for the argument. Common examples might be `{"-h",
78 "--help"}` where both `--help` and `-h` are aliases for the same argument.
80 The simplest kind of argument just tests for presence, but we often want to parse out a particular
88 After an argument definition is provided, the parser builder needs to know what type the argument
89 will be in order to provide the type safety and make sure the rest of the argument definition is
90 correct as early as possible (in essence, everything but the parsing of the argument name is done at
96 argument that only cares about presence).
104 When parsing an enumeration, it might be very convenient to map a list of possible argument string
120 When an argument definition has multiple aliases with no wildcards, it might be convenient to
130 In general, it uses the position of the argument alias to map into the WithValues position value.
132 (Note that this method will not work when the argument definitions have a wildcard because there is
136 By default, the argument is assumed to appear exactly once, and if the user specifies it more than
137 once, only the latest value is taken into account (and all previous occurrences of the argument are
140 In some situations, we may want to accumulate the argument values instead of discarding the previous
152 ### Setting an argument parse target (required)
153 To complete an argument definition, the parser generator also needs to know where to save values.
165 will save occurrences of the `-help` argument by doing a `Map.Set(Map::Help, ParsedValue("-help"))`
170 This is highly discouraged, but for compatibility with `JNI` which allows argument ignores, there is
171 an option to ignore any argument tokens that are not known to the parser. This is done with the
172 `Ignore` function which takes a list of argument definition names.
174 It's semantically equivalent to making a series of argument definitions that map to `Unit` but don't
176 with invalid values, only user-arguments for which it could not find a matching argument definition.
213 Will parse any non-append argument definitions with a type of `double`.
227 Will parse multiple instances of the same argument repeatedly into the `existing_value` (which will
228 be default-constructed to `T{}` for the first occurrence of the argument).