More work on binder, implements basic literal expressions
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "Script.hpp"
|
||||
#include "Parser/Lexer.hpp"
|
||||
#include "Parser/Parser.hpp"
|
||||
#include "Binder/Binder.hpp"
|
||||
|
||||
Script Script::Create(string script) {
|
||||
auto s = Script();
|
||||
@@ -13,6 +14,7 @@ Script Script::Create(string script) {
|
||||
|
||||
Script::~Script() {
|
||||
delete this -> Diagnostics;
|
||||
delete this -> BoundScript;
|
||||
}
|
||||
|
||||
void Script::Parse(string script) {
|
||||
@@ -24,5 +26,9 @@ void Script::Parse(string script) {
|
||||
delete token;
|
||||
}
|
||||
lexResult.clear();
|
||||
if (!Diagnostics->HasErrors()){
|
||||
this->BoundScript = Binder::Bind(parseResult);
|
||||
}
|
||||
delete parseResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user