Sha256: bd5db5419706f7da3dfea35baee7a5b02b558ff97a9e821cbaa4c232e2403491

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

module Dolos
  class Result[A]

  end

  class Success[A] < Result[A]
    attr_reader captures: Array[untyped]
    attr_reader length: Integer
    attr_reader value: A

    def capture!: -> Success[A]

    def failure?: -> bool
    def success?: -> bool
  end

  class Failure < Result[bot]
    @message_proc: ^-> String
    @message_evaluated: bool
    @message_value: String
    @state: ParserState

    attr_reader committed: bool
    attr_reader error_position: Integer
    attr_reader message: String

    def captures: -> []

    def failure?: -> bool

    def map: [B](^(bot) -> B) -> Result[B]

    def pretty_print: -> String

    def success?: -> bool
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dolos-0.3.1 sig/dolos/result.rbs
dolos-0.3.0 sig/dolos/result.rbs
dolos-0.2.1 sig/dolos/result.rbs