(zelf: &Compiler)
| 341 | } |
| 342 | |
| 343 | fn eprint_location(zelf: &Compiler) { |
| 344 | let start = zelf |
| 345 | .source_file |
| 346 | .to_source_code() |
| 347 | .source_location(zelf.current_source_range.start(), PositionEncoding::Utf8); |
| 348 | let end = zelf |
| 349 | .source_file |
| 350 | .to_source_code() |
| 351 | .source_location(zelf.current_source_range.end(), PositionEncoding::Utf8); |
| 352 | eprintln!( |
| 353 | "LOCATION: {} from {}:{} to {}:{}", |
| 354 | zelf.source_file.name(), |
| 355 | start.line, |
| 356 | start.character_offset, |
| 357 | end.line, |
| 358 | end.character_offset |
| 359 | ); |
| 360 | } |
| 361 | |
| 362 | /// Better traceback for internal error |
| 363 | #[track_caller] |
no test coverage detected