(err error, input *parse.Input, offset int)
| 512 | } |
| 513 | |
| 514 | func UpdateErrorPosition(err error, input *parse.Input, offset int) error { |
| 515 | if perr, ok := err.(*parse.Error); ok { |
| 516 | r := bytes.NewBuffer(input.Bytes()) |
| 517 | line, column, _ := parse.Position(r, offset) |
| 518 | perr.Line += line - 1 |
| 519 | perr.Column += column - 1 |
| 520 | return perr |
| 521 | } |
| 522 | return err |
| 523 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…