Make Diagnostics usage a pointer

This commit is contained in:
2019-05-21 14:15:39 +02:00
parent 99f50b6471
commit 8f2f122215
4 changed files with 13 additions and 4 deletions

View File

@@ -11,6 +11,10 @@ Script Script::Create(string script) {
return s;
}
Script::~Script() {
delete this -> Diagnostics;
}
void Script::Parse(string script) {
auto lexer = Lexer(std::move(script), this);
auto lexResult = lexer.Lex();
@@ -21,3 +25,4 @@ void Script::Parse(string script) {
}
lexResult.clear();
}