/**
* @description
* the pair of the string to be matched later and the string that have been matched
- * @param matched : string have been matched
- * @param remained : string will be tested whether it'll be matched.
- */
-export type MatcheePair = {matched : string; remained : string};
+*/
+export interface MatcheePair {
+ /** have been matched */
+ matched : string
+ /** will be tested whether it'll be matched. */
+ remained : string
+}
/**
* @description
{matched:"",
remained: input});
- // integer = ([+]|[-])\d\d?
+ // integer = ([+]|[-])?\d\d*
let integer = (x : MatcheePair) =>
{ let wrapped_x = toSome(x);
let plusMinus = orDo(match1Char('+'), match1Char('-')); // ([+]|[-])
tokenize("123");
tokenize("-123");
tokenize(" 123");
-tokenize("c123");
\ No newline at end of file
+tokenize("c123");