package cmdlang-stdlib-runner

  1. Overview
  2. Docs

Module Cmdlang_stdlib_runner.Parser_stateSource

A mutable state that will collect parsing information.

The strategy implemented by the cmdlang runner is to create such parser state, enrich it during a parsing phases using stdlib.arg, and once this is done, return an expression suitable for evaluation.

Sourcetype 'a t

Initialization

In this part we allocate a parser state for a given parser. Once this is done, the parser must be enriched with information coming from the command line.

Parsing

This part is what allows stdlib.arg to performs the expected side-effects within the state.

Sourceval spec : _ t -> (Arg.key * Arg.spec * Arg.doc) list
Sourceval positional_state : _ t -> Positional_state.t

Finalization

Once the parsing has been done, we can finalize the state and return an evaluation suitable for execution.

OCaml

Innovation. Community. Security.