(c: string)
| 114 | WS = 4, |
| 115 | SYM = 5; |
| 116 | const charType = function (c: string) { |
| 117 | if (/[a-z]/.exec(c)) return LC; |
| 118 | if (/[A-Z]/.exec(c)) return UC; |
| 119 | if (/[0-9]/.exec(c)) return NUM; |
| 120 | if (/\s/.exec(c)) return WS; |
| 121 | return SYM; |
| 122 | }; |
| 123 | |
| 124 | // Single words can be [A-Z][a-z]+, [A-Z]+, [a-z]+, [0-9]+ or \s+. |
| 125 | const words = []; |