Add backslash to invalid control character error, made pretty error messages use 1-based line index
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-19 13:33:01 +02:00
parent 8541085b27
commit 6bcedaf743
3 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ std::string DiagnosticsHolder::GetFullErrorMessage(Diagnostic diagnostic) {
auto startPos = diagnostic.GetStartPosition();
auto line = this -> GetLineFromPosition(startPos);
auto linePos = startPos - this ->GetStartPositionForLine(line);
stream << " (" << line << ", " << linePos << ") ";
stream << " (" << line + 1 << ", " << linePos + 1 << ") ";
auto unformatted = ErrorMessages.find(diagnostic.GetCode());
if (unformatted != ErrorMessages.end()){
stream << PrettyDiagnostic(unformatted->second, diagnostic.GetArguments());