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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -304,9 +304,9 @@ namespace Porygon::Parser {
|
||||
if (ControlCharacters.find(c) != ControlCharacters.end()) {
|
||||
stream << ControlCharacters.at(c);
|
||||
} else {
|
||||
auto v = string(1, c).c_str();
|
||||
auto v = ("\\" + string(1, c)).c_str();
|
||||
this->ScriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::InvalidStringControlCharacter,
|
||||
start + 1 + i, 1, {v});
|
||||
start + i, 2, {v});
|
||||
stream << c;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user