From 3a43ce11ac1aec9b2c00d7c5f966919b71f5eda7 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 5 Jun 2022 13:54:09 +0000 Subject: With the improved escape sequence parser, it becomes easy to also improve diagnostics. Distinguish "incomplete escape sequence", "invalid special character", and "unknown special character" from the generic "invalid escape sequence", also promoting them from WARNING to ERROR because incomplete escape sequences are severe syntax violations and because encountering an invalid or unknown special character makes it likely that part of the document content intended by the authors gets lost. --- mandoc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 03e469dc..f50405e9 100644 --- a/mandoc.h +++ b/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.277 2022/05/19 15:37:47 schwarze Exp $ */ +/* $Id: mandoc.h,v 1.278 2022/06/05 13:54:09 schwarze Exp $ */ /* * Copyright (c) 2012-2022 Ingo Schwarze * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons @@ -235,6 +235,11 @@ enum mandocerr { MANDOCERR_ARG_EXCESS, /* skipping excess arguments: macro ... args */ MANDOCERR_DIVZERO, /* divide by zero */ + /* related to escape sequences */ + MANDOCERR_ESC_INCOMPLETE, /* incomplete escape sequence: esc */ + MANDOCERR_ESC_BADCHAR, /* invalid special character: esc */ + MANDOCERR_ESC_UNKCHAR, /* unknown special character: esc */ + MANDOCERR_UNSUPP, /* ===== start of unsupported features ===== */ MANDOCERR_TOOLARGE, /* input too large */ -- cgit v1.2.3