Update index.ts

This commit is contained in:
Tan, Kian-ting 2023-09-06 00:10:26 +08:00 committed by GitHub
parent de89b30b02
commit 646576d56f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
tokenize("c123");