Skip to content

CommandParser

[Source]

class ref CommandParser

Constructors

create

[Source]

Creates a new parser for a given command spec.

new box create(
  spec': CommandSpec box)
: CommandParser box^

Parameters

Returns


Public Functions

parse

[Source]

Parses all of the command line tokens and env vars and returns a Command, or the first SyntaxError.

fun box parse(
  argv: Array[String val] box,
  envs: (Array[String val] box | None val) = reference)
: (Command box | CommandHelp box | SyntaxError val)

Parameters

Returns