aboutsummaryrefslogtreecommitdiff
path: root/err.h
diff options
context:
space:
mode:
Diffstat (limited to 'err.h')
-rw-r--r--err.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/err.h b/err.h
index 39e3cc74..d9d19ec7 100644
--- a/err.h
+++ b/err.h
@@ -19,6 +19,10 @@
#define ERR_F(fmt, ...) fprintf(stderr, _RED "ERR" _RESET " (%s:%i) " fmt "\n", \
__FILE__, __LINE__, ##__VA_ARGS__)
+/* Parse error */
+#define ERR_P(ctx, fmt, ...) fprintf(stderr, _RED "PARSE" _RESET " (%s:%i) %i:%i " fmt "\n", \
+ __FILE__, __LINE__, (ctx)->pline, (ctx)->pcolumn, ##__VA_ARGS__)
+
#define INFO(msg) fprintf(stderr, _BLUE "INFO" _RESET " (%s:%i) %s\n", __FILE__, __LINE__, #msg)
#define INFO_F(fmt, ...) fprintf(stderr, _BLUE "INFO" _RESET " (%s:%i) " fmt "\n", \
__FILE__, __LINE__, ##__VA_ARGS__)