#include "reader.h"
#include "uniqstr.h"
-#include <ctype.h>
+#include <c-ctype.h>
#include <mbswidth.h>
#include <quote.h>
\\(.|\n) {
char const *p = yytext + 1;
/* Quote only if escaping won't make the character visible. */
- if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p))
+ if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p))
p = quote (p);
else
p = quotearg_style_mem (escape_quoting_style, p, 1);
location loc;
loc.start = start;
loc.end = scanner_cursor;
+ token_end = quote (token_end);
+ // Instead of '\'', display "'".
+ if (!strcmp (token_end, "'\\''"))
+ token_end = "\"'\"";
complain_at (loc, _(msgid), token_end);
}
static void
unexpected_eof (boundary start, char const *token_end)
{
- unexpected_end (start, N_("missing '%s' at end of file"), token_end);
+ unexpected_end (start, N_("missing %s at end of file"), token_end);
}
static void
unexpected_newline (boundary start, char const *token_end)
{
- unexpected_end (start, N_("missing '%s' at end of line"), token_end);
+ unexpected_end (start, N_("missing %s at end of line"), token_end);
}