Add support for diagnostics

This commit is contained in:
2019-05-21 13:56:08 +02:00
parent 26f1ed27a3
commit 2b35da3a7b
11 changed files with 161 additions and 68 deletions

View File

@@ -2,6 +2,8 @@
#include "Script.hpp"
#include "Parser/Lexer.hpp"
#include "Parser/Parser.hpp"
Script Script::Create(string script) {
auto s = Script();
@@ -10,7 +12,7 @@ Script Script::Create(string script) {
}
void Script::Parse(string script) {
auto lexer = Lexer(std::move(script));
auto lexer = Lexer(std::move(script), this);
auto lexResult = lexer.Lex();
auto parser = Parser(lexResult);
auto parseResult = parser.Parse();