Sha256: 844c9939cd83ab7c5595bb662cbe0b5a0c285915ee1f3c03ca4f42633568cf0f

Contents?: true

Size: 735 Bytes

Versions: 5

Compression:

Stored size: 735 Bytes

Contents

module Dolos
  class Parser[A]
    attr_accessor parser_proc: ^(ParserState) -> Result[A]
    def initialize: (^(ParserState) -> Result[A]) -> Parser[A]
    def capture!: -> Parser[A]
    def choice: [B](Parser[B])-> Parser[A | B]
    def flat_map: [B](Parser[A], ^(A) -> Parser[B]) -> Parser[B]
    def flatten: -> Parser[A]
    def map: [B](^(A) -> B) -> Parser[B]
    def map_value: [B](^(A) -> B) -> Parser[B]
    def optional: -> Parser[A?]
    def product: [B](Parser[A]) -> Parser[B]
    def run: (String) -> Result[A]
    def run_with_state: (ParserState) -> Result[A]
    def repeat: (Integer, Integer)-> Parser[Array[A]]
    def zero_or_more: -> Parser[Array[A]]
    def one_or_more: (Integer?) -> Parser[Array[A]]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dolos-0.2.0 sig/dolos/parser.rbs
dolos-0.1.3 sig/dolos/parser.rbs
dolos-0.1.2 sig/dolos/parser.rbs
dolos-0.1.1 sig/dolos/parser.rbs
dolos-0.1.0 sig/dolos/parser.rbs