Skip to content

Implement value parsing in the option/optionspec type #3

Description

The Parser type uses a fair bit of reflection and knowledge of the OptionSpec<>/OptionSpec<,> types to implement type safe parsing of values. Update the Option and/or OptionSpec types to handle the value parsing and reduce the reflection/complexity of the top level Parser type.

The top level parser will

  • inspect the input and locate the correct parser; an option specific parser or an argument parser, removing the option name from front of the input if applicable
  • pass the current parser state (minus the option name if applicable) to the located parser, which will return consume from input and return the updated state
  • repeat until input is empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions