summaryrefslogtreecommitdiff
path: root/src/location.h
diff options
context:
space:
mode:
authorTheophile Ranquet <ranquet@lrde.epita.fr>2012-11-30 14:34:56 +0100
committerTheophile Ranquet <ranquet@lrde.epita.fr>2012-12-05 13:46:01 +0100
commit3f5d1b2c67651a9d620946de421f2e51600b885e (patch)
tree3d00d5b06e3fb46d21d77a07c38afc7bb5a4045d /src/location.h
parent0db2648930e3b6c376a539aabe368aade83ee29a (diff)
downloadbison-3f5d1b2c67651a9d620946de421f2e51600b885e.tar.gz
errors: show carets
* src/locations.c (caret_info): New, persistant information useful for... (location_caret): New, print a caret. (cleanup_caret): Release caret_info cleanly, call it... * src/main.c (main): Here. * src/complain.c (error_message): Call location_caret here.
Diffstat (limited to 'src/location.h')
-rw-r--r--src/location.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/location.h b/src/location.h
index 5ebb92e3..c1859aeb 100644
--- a/src/location.h
+++ b/src/location.h
@@ -102,6 +102,13 @@ void location_compute (location *loc,
characters. */
unsigned location_print (FILE *out, location loc);
+/* Free any allocated ressources and close any open file handles that are
+ left-over by the usage of location_caret. */
+void cleanup_caret (void);
+
+/* Output to OUT the line and caret corresponding to location LOC. */
+void location_caret (FILE *out, location loc);
+
/* Return -1, 0, 1, depending whether a is before, equal, or
after b. */
static inline int