Spec-Zone.ru › Pony

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

  • spec': CommandSpec box

Returns

  • CommandParser box^

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

  • argv: Array[String val] box
  • envs: (Array[String val] box | None val) = reference

Returns

  • (Command box | CommandHelp box | SyntaxError val)

© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/cli-CommandParser

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API