Move Diagnostics to separate namespace
This commit is contained in:
@@ -99,7 +99,7 @@ namespace Porygon::Parser {
|
||||
Lexer::Next();
|
||||
return new SimpleToken(TokenKind::InequalityToken, this->_position - 2, 2);
|
||||
}
|
||||
this->ScriptData->Diagnostics->LogError(DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
this->ScriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
return new SimpleToken(TokenKind::BadToken, this->_position - 1, 1);
|
||||
case '0':
|
||||
case '1':
|
||||
@@ -122,7 +122,7 @@ namespace Porygon::Parser {
|
||||
if (isalpha(c) || c > 255) {
|
||||
return LexIdentifierOrKeyword();
|
||||
}
|
||||
this->ScriptData->Diagnostics->LogError(DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
this->ScriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
return new SimpleToken(TokenKind::BadToken, this->_position - 1, 1);
|
||||
}
|
||||
}
|
||||
@@ -289,7 +289,7 @@ namespace Porygon::Parser {
|
||||
}
|
||||
auto closeToken = this->Next();
|
||||
if (closeToken != c) {
|
||||
this->ScriptData->Diagnostics->LogError(DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
this->ScriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::UnexpectedCharacter, this->_position - 1, 1);
|
||||
return new SimpleToken(TokenKind::BadToken, start, end - start + 1);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace Porygon::Parser {
|
||||
if (ControlCharacters.find(c) != ControlCharacters.end()) {
|
||||
stream << ControlCharacters.at(c);
|
||||
} else {
|
||||
this->ScriptData->Diagnostics->LogError(DiagnosticCode::InvalidStringControlCharacter,
|
||||
this->ScriptData->Diagnostics->LogError(Diagnostics::DiagnosticCode::InvalidStringControlCharacter,
|
||||
start + 1 + i, 1);
|
||||
stream << c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user