Variable getColConst

getCol: Simple.Parser<number> = A.getCol

This is a more efficient version of getPosition.map(t => t[1]). This can be useful in combination with withIndent and getIndent, like this:

const checkIndent: P.Parser<P.Unit> = P.succeed(
(indent: number) => (column: number) => indent <= column
)
.apply(P.getIndent)
.apply(P.getCol)
.andThen((isIdented) => {
if (isIdented) {
return P.succeed(P.Unit);
} else {
return P.problem("expecting more spaces");
}
});

So the checkIndent parser only succeeds when you are "deeper" than the current indent level.