(line: string)
| 511 | } |
| 512 | |
| 513 | private tokenize(line: string): string[] { |
| 514 | // Split on whitespace and semicolons, keeping semicolons as tokens |
| 515 | const tokens: string[] = []; |
| 516 | let current = ""; |
| 517 | |
| 518 | for (const char of line) { |
| 519 | if (char === " " || char === "\t") { |
| 520 | if (current) { |
| 521 | tokens.push(current); |
| 522 | current = ""; |
| 523 | } |
| 524 | } else if (char === ";") { |
| 525 | if (current) { |
| 526 | tokens.push(current); |
| 527 | current = ""; |
| 528 | } |
| 529 | tokens.push(";"); |
| 530 | } else { |
| 531 | current += char; |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | if (current) { |
| 536 | tokens.push(current); |
| 537 | } |
| 538 | |
| 539 | return tokens; |
| 540 | } |
| 541 | |
| 542 | private verifySemicolon(tokens: string[], index: number): void { |
| 543 | if (index >= tokens.length) { |
no test coverage detected