File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,9 @@ final class newMain extends MainAnnotation:
236
236
override def argGetter [T ](idx : Int , optDefaultGetter : Option [() => T ])(using p : Parser [T ]): () => T =
237
237
val name = parameterInfos(idx).name
238
238
val parameterInfo = nameToParameterInfo(name)
239
-
239
+ // TODO: Decide which string is associated with this arg when constructing the command.
240
+ // Here we should only get the string for this argument, apply it to the parser and handle parsing errors.
241
+ // Should be able to get the argument from its index.
240
242
byNameArgs.get(name) match {
241
243
case Some (Nil ) =>
242
244
throw AssertionError (s " $name present in byNameArgs, but it has no argument value " )
@@ -259,7 +261,9 @@ final class newMain extends MainAnnotation:
259
261
260
262
override def varargGetter [T ](using p : Parser [T ]): () => Seq [T ] =
261
263
val name = parameterInfos.last.name
262
-
264
+ // TODO: Decide which strings are associated with the varargs when constructing the command.
265
+ // Here we should only get the strings for this argument, apply them to the parser and handle parsing errors.
266
+ // Should be able to get the argument from its index (last).
263
267
val byNameGetters = byNameArgs.getOrElse(name, Seq ()).map(arg => convert(name, arg))
264
268
val positionalGetters = positionalArgs.removeAll.map(arg => convert(name, arg))
265
269
// First take arguments passed by name, then those passed by position
You can’t perform that action at this time.
0 commit comments