From ae8af6b1d8860b18ae159499af397d067f46c46a Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Tue, 3 Dec 2019 23:03:14 -0500 Subject: fixed another problem, and now I kind of know whats going on with Arr --- location.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'location.c') diff --git a/location.c b/location.c index d3ad5b8..6784c77 100644 --- a/location.c +++ b/location.c @@ -3,9 +3,14 @@ static bool location_after(Location a, Location b) { /* a is after b? */ return a.code > b.code; } +/* for debugging */ static void fprint_location(FILE *out, Location location) { char *newline = strchr(location.code, '\n'); if (newline) *newline = 0; fprintf(out, "Line %ld: %s\n", (long)location.line, location.code); if (newline) *newline = '\n'; } + +static void print_location(Location location) { + fprint_location(stdout, location); +} -- cgit v1.2.3