Function keyword

  • Just like Simple.keyword except you provide a Token to clearly indicate your custom type of problems:

         const myLet = keyword(Token("let", ExpectingLet))
    

    Note that this would fail to chomp letter because of the subsequent characters. Use token if you do not want that last letter checked.

    Type Parameters

    • PROBLEM

    Parameters

    Returns Parser.Parser<Symbol, never, PROBLEM>