This commit is contained in:
@@ -18,13 +18,10 @@ namespace Porygon::Diagnostics {
|
||||
std::vector<std::string> _arguments;
|
||||
std::string* _message;
|
||||
public:
|
||||
Diagnostic(DiagnosticSeverity severity, DiagnosticCode code, unsigned int start, unsigned int length, std::vector<std::string> arguments) {
|
||||
_severity = severity;
|
||||
_code = code;
|
||||
_start = start;
|
||||
_length = length;
|
||||
_arguments = std::move(arguments);
|
||||
_message = nullptr;
|
||||
Diagnostic(DiagnosticSeverity severity, DiagnosticCode code, unsigned int start, unsigned int length, std::vector<std::string> arguments)
|
||||
: _severity(severity), _code(code), _start(start), _length(length), _arguments(std::move(arguments)), _message(
|
||||
nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
~Diagnostic(){
|
||||
|
||||
@@ -19,9 +19,7 @@ namespace Porygon::Diagnostics {
|
||||
vector<size_t> _lineLength;
|
||||
|
||||
public:
|
||||
explicit DiagnosticsHolder(const u16string& str) {
|
||||
_hasErrors = false;
|
||||
_lineStarts = vector<size_t>{0};
|
||||
explicit DiagnosticsHolder(const u16string& str) :_hasErrors(false), _lineStarts(vector<size_t>{0}) {
|
||||
size_t lineLength = 0;
|
||||
for (size_t i = 0; i < str.size(); i++){
|
||||
lineLength++;
|
||||
|
||||
Reference in New Issue
Block a user