]> git.kianting.info Git - clo/blobdiff - src/index.ts
Update index.ts
[clo] / src / index.ts
index bcd3e10cc153cc9ee1495f29aaecce30401465ee..7ab5f5f48638b2ae6e3e3669d52ae552593c04ff 100644 (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('-')); // ([+]|[-])
@@ -242,6 +242,7 @@ export function tokenize(input : string){
     }
     console.log(input+", result: ");
     console.log(thenDo(input_matchee_pair, integer));
+    // TODO: id, string, space, basic operator, 3 marks: @, {, }.
 
 }
 
@@ -249,4 +250,4 @@ tokenize("+123");
 tokenize("123");
 tokenize("-123");
 tokenize(" 123");
-tokenize("c123");
\ No newline at end of file
+tokenize("c123");