Function chompIf

  • Just like Simple.chompIf except you provide a problem in case a character cannot be chomped.

    Parameters

    • isGood: ((char: string) => boolean)
        • (char: string): boolean
        • Parameters

          • char: string

          Returns boolean

    Returns (<PROBLEM>(expecting: PROBLEM) => Parser.Parser<Symbol, never, PROBLEM>)

      • <PROBLEM>(expecting: PROBLEM): Parser.Parser<Symbol, never, PROBLEM>
      • Type Parameters

        • PROBLEM

        Parameters

        • expecting: PROBLEM

        Returns Parser.Parser<Symbol, never, PROBLEM>