diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index e5000aa94..d35615700 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8253,7 +8253,7 @@ void Tokenizer::syntaxError(const Token *tok, char c) const { printDebugOutput(0); throw InternalError(tok, - std::string("Invalid number of character (") + c + ") " + + std::string("Invalid number of character '") + c + "' " + "when these macros are defined: '" + _configuration + "'.", InternalError::SYNTAX); } diff --git a/samples/syntaxError/out.txt b/samples/syntaxError/out.txt index 5689c3a20..eafd9d47b 100644 --- a/samples/syntaxError/out.txt +++ b/samples/syntaxError/out.txt @@ -1 +1 @@ -[samples\syntaxError\bad.c:2]: (error) Invalid number of character ({) when these macros are defined: 'A'. +[samples\syntaxError\bad.c:2]: (error) Invalid number of character '{' when these macros are defined: 'A'. diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index ea9f559ff..27e118696 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -4190,7 +4190,7 @@ private: tokenizer.tokenize(istr, "test.cpp"); assertThrowFail(__FILE__, __LINE__); } catch (InternalError& e) { - ASSERT_EQUALS("Invalid number of character (() when these macros are defined: ''.", e.errorMessage); + ASSERT_EQUALS("Invalid number of character '(' when these macros are defined: ''.", e.errorMessage); ASSERT_EQUALS("syntaxError", e.id); ASSERT_EQUALS(2, e.token->linenr()); }