Skip to main content
Module

x/pazza/mod.ts>many0

Parser combinators library designed for Deno, but also works on browsers and Node.js.
Go to Latest
function many0
import { many0 } from "https://deno.land/x/pazza@v0.3.0/mod.ts";

Repeat them embedded parser any times, at least 0.

many0(alpha())("").output; // ==> []
many0(alpha())("a").output; // ==> ["a"]
many0(alpha())("a1").output; // ==> ["a"]
many0(alpha())("a1").input === "1";

Type Parameters

T
E
I extends Input
CtxIn
CtxOut

Parameters

parser: IParser<T, E, I, CtxIn, CtxOut>

embedded parser