summaryrefslogtreecommitdiff
path: root/location.c
diff options
context:
space:
mode:
Diffstat (limited to 'location.c')
-rw-r--r--location.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/location.c b/location.c
index 2cc63e5..35952de 100644
--- a/location.c
+++ b/location.c
@@ -9,7 +9,11 @@ static Location const LOCATION_NONE = {0};
/* for debugging */
static void fprint_location(FILE *out, Location location) {
if (!location.start) {
- fprintf(out, "No location available.");
+ if (location.simple_location) {
+ fprintf(out, "Line %lu of %s\n", (unsigned long)location.simple_location->line, location.simple_location->ctx->filename);
+ } else {
+ fprintf(out, "No location available.");
+ }
return;
}
/* TODO: show end */