Add support for diagnostics to parser

This commit is contained in:
2019-05-21 14:00:14 +02:00
parent 2b35da3a7b
commit 99f50b6471
5 changed files with 40 additions and 24 deletions

View File

@@ -14,7 +14,7 @@ Script Script::Create(string script) {
void Script::Parse(string script) {
auto lexer = Lexer(std::move(script), this);
auto lexResult = lexer.Lex();
auto parser = Parser(lexResult);
auto parser = Parser(lexResult, this);
auto parseResult = parser.Parse();
for (auto token : lexResult){
delete token;