Variable endConst

end: Simple.Parser<Parser.Unit> = ...

Check if you have reached the end of the string you are parsing.

Remarks

Example

Just An Int

    const justAnInt: Parser<number> =
succeed((n: number) => n)
.apply(int)
.skip(end)

// run(justAnInt("90210")) => Ok(90210)
// run(justAnInt("1 + 2")) => Err(...)
// run(int("1 + 2")) . => Ok(1)

Parsers can succeed without parsing the whole string. Ending your parser with end guarantees that you have successfully parsed the whole string.