(str, index)
| 795 | } |
| 796 | |
| 797 | function countLinesUntil(str, index) { |
| 798 | var count = 1; |
| 799 | while ((index = str.lastIndexOf('\n', index)) !== -1) { |
| 800 | ++count; |
| 801 | --index; |
| 802 | } |
| 803 | return count; |
| 804 | } |
| 805 | |
| 806 | function indexToLineAndColumn(src, index) { |
| 807 | var indexOfLine = src.lastIndexOf('\n', index-1) + 1; |
no outgoing calls
no test coverage detected