(normalized: string)
| 60 | |
| 61 | /** Code-aware tokens: identifiers/keywords AND operators/punctuation (structure matters). PURE. */ |
| 62 | export function codeTokens(normalized: string): string[] { |
| 63 | return normalized.match(/[A-Za-z_$][\w$]*|[+\-*/%<>=!&|^~?:;,.(){}\[\]]/g) ?? []; |
| 64 | } |
| 65 | |
| 66 | function round(x: number): number { return Math.round(x * 100) / 100; } |
| 67 |
no outgoing calls
no test coverage detected