Commit fcfa9fc
committed
Add line and column numbers to error diagnostics
The original error() function only showed the raw byte offset and a
caret line, this change adds 1-based line and column numbers
while leaving everything else unchanged.
This is done by reusing start_idx and backtracking through SOURCE
to count newlines.1 parent 60dccd5 commit fcfa9fc
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1396 | 1396 | | |
1397 | 1397 | | |
1398 | 1398 | | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1404 | 1410 | | |
1405 | 1411 | | |
1406 | 1412 | | |
| |||
0 commit comments