Tokenizer::syntaxError: put the character that we have an invalid number of into singlequotes instead of parentheses.

This commit is contained in:
Matthias Krüger 2015-07-31 13:31:11 +02:00
parent 87891b4128
commit 83ee640977
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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'.

View File

@ -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());
}