* Get the line number for a character index
(index: number)
| 517 | * Get the line number for a character index |
| 518 | */ |
| 519 | private getLineNumber(index: number): number { |
| 520 | const substring = this.source.substring(0, index); |
| 521 | return (substring.match(/\n/g) || []).length + 1; |
| 522 | } |
| 523 | |
| 524 | /** |
| 525 | * Get the character index of the start of a line |
no outgoing calls
no test coverage detected