TrailingArgumentsParser

Parses the trailing arguments (including the arguments to last option). Uses simple backtraking algorithm.

Parses the trailing arguments (including the arguments to last option). Uses simple backtraking algorithm.

class Object
trait Matchable
class Any

Type members

Classlikes

case class ParseResult(result: List[(CliOption, String, Either[(String, List[String]), List[String]])], failedArgumentsCount: Int, excessArguments: List[String]) extends Ordered[ParseResult]

Contains error messages or matched argument lists for each option, also storing number of arguments that failed to match and excess arguments.

Contains error messages or matched argument lists for each option, also storing number of arguments that failed to match and excess arguments.

Also defines ordering for selecting best-match failure from list of failures.

Value members

Concrete methods

def parse(leadingArgs: List[String], lastMultiArgOption: Option[(CliOption, String)], trailingArgs: List[String], trailingOptions: List[CliOption], resultAcc: ParseResult): ParseResult

Run parse.

Run parse.

Value Params
lastMultiArgOption

option definition and invocation string forthe last multi-arg option (if it was present)

leadingArgs

trailing arguments before last multi-arg option (will be Nil if there was no last multi-arg option)

trailingArgs

trailing arguments after the last multi-arg option (including arguments to that option if it is present)

trailingOptions

list of trailing option definitions