Parser

public protocol Parser

A parser.

  • The type of the input data.

    Declaration

    Swift

    associatedtype Input
  • The type of the output data.

    Declaration

    Swift

    associatedtype Output
  • Parses input data and returns the output data or throws on error.

    Throws

    Implementation-specific error.

    Declaration

    Swift

    func parse(_ input: Input) throws -> Output

    Parameters

    input

    The data to parse.

    Return Value

    The parsed data.