From: Tan, Kian-ting Date: Tue, 5 Sep 2023 16:10:26 +0000 (+0800) Subject: Update index.ts X-Git-Url: https://git.kianting.info/?a=commitdiff_plain;h=646576d56fd4897869a1f16e809ead8457e162ba;p=uann Update index.ts --- diff --git a/src/index.ts b/src/index.ts index e22fdbb..7ab5f5f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -231,7 +231,7 @@ export function tokenize(input : string){ {matched:"", remained: input}); - // integer = ([+]|[-])\d\d? + // integer = ([+]|[-])?\d\d* let integer = (x : MatcheePair) => { let wrapped_x = toSome(x); let plusMinus = orDo(match1Char('+'), match1Char('-')); // ([+]|[-]) @@ -250,4 +250,4 @@ tokenize("+123"); tokenize("123"); tokenize("-123"); tokenize(" 123"); -tokenize("c123"); \ No newline at end of file +tokenize("c123");