Sha256: a60b7494ad9622136df7fb2064314e2baa917883a9da9692252bd34441e2f520

Contents?: true

Size: 930 Bytes

Versions: 3

Compression:

Stored size: 930 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 combine: [B](^(A, B) -> Parser[B]) -> Parser[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_captures: [B](^(A) -> B) -> Parser[B]
    def optional: -> Parser[A?]
    def product: [B](Parser[A]) -> Parser[B]
    def product_l: [B](Parser[B]) -> Parser[B]
    def product_r: [B](Parser[B]) -> Parser[A]
    def run: (String) -> Result[A]
    def run_with_state: (ParserState) -> Result[A]
    def repeat: [B](Integer, Integer, Parser[B]?)-> Parser[Array[A]]
    def zero_or_more: -> Parser[Array[A]]
    def one_or_more: (Integer?) -> Parser[Array[A]]
    def lazy: -> Parser[A]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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