* Get the line number for a character index
(index: number)
| 375 | * Get the line number for a character index |
| 376 | */ |
| 377 | private getLineNumber(index: number): number { |
| 378 | const substring = this.source.substring(0, index); |
| 379 | return (substring.match(/\n/g) || []).length + 1; |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * Get the character index of the start of a line |
no outgoing calls
no test coverage detected