PorygonLang/src/Script.cpp

22 lines
431 B
C++
Raw Normal View History

2019-05-21 10:59:15 +00:00
#include <utility>
#include "Script.hpp"
Script Script::Create(string script) {
auto s = Script();
s.Parse(std::move(script));
return s;
}
void Script::Parse(string script) {
auto lexer = Lexer(std::move(script));
auto lexResult = lexer.Lex();
auto parser = Parser(lexResult);
auto parseResult = parser.Parse();
for (auto token : lexResult){
delete token;
}
lexResult.clear();
}