Just like Simple.int where you have to handle negation yourself. The only difference is that you provide two potential problems:
const int =<PROBLEM>(expecting: PROBLEM) =>(invalid: PROBLEM): Parser<PROBLEM, number> => { return number({ int: Ok((id: number) => id), hex: Err(invalid), octal: Err(invalid), binary: Err(invalid), float: Err(invalid), invalid: invalid, expecting: expecting, });};
You can use problems like ExpectingInt and InvalidNumber.
ExpectingInt
InvalidNumber
Just like Simple.int where you have to handle negation yourself. The only difference is that you provide two potential problems:
You can use problems like
ExpectingInt
andInvalidNumber
.