2019-05-21 10:59:15 +00:00
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PORYGONLANG_SCRIPT_HPP
|
|
|
|
#define PORYGONLANG_SCRIPT_HPP
|
|
|
|
|
|
|
|
#include <string>
|
2019-05-23 16:50:09 +00:00
|
|
|
#include <boost/any.hpp>
|
2019-05-21 11:56:08 +00:00
|
|
|
#include "Diagnostics/Diagnostics.hpp"
|
2019-05-21 18:59:26 +00:00
|
|
|
#include "Binder/BoundStatements/BoundStatement.hpp"
|
2019-05-23 16:50:09 +00:00
|
|
|
class Script;
|
|
|
|
class Evaluator;
|
|
|
|
#include "Evaluator/Evaluator.hpp"
|
2019-05-21 10:59:15 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class Script {
|
2019-05-23 16:50:09 +00:00
|
|
|
friend class Evaluator;
|
|
|
|
|
|
|
|
boost::any* _lastValue;
|
|
|
|
|
|
|
|
Evaluator* _evaluator;
|
|
|
|
|
|
|
|
explicit Script();
|
2019-05-21 10:59:15 +00:00
|
|
|
|
|
|
|
void Parse(string script);
|
2019-05-21 18:59:26 +00:00
|
|
|
BoundScriptStatement* BoundScript;
|
2019-05-21 10:59:15 +00:00
|
|
|
public:
|
|
|
|
static Script Create(string script);
|
2019-05-21 12:15:39 +00:00
|
|
|
Diagnostics* Diagnostics;
|
|
|
|
|
|
|
|
~Script();
|
2019-05-23 16:50:09 +00:00
|
|
|
|
|
|
|
void Evaluate();
|
|
|
|
|
|
|
|
boost::any* GetLastValue(){
|
|
|
|
return _lastValue;
|
|
|
|
};
|
2019-05-21 10:59:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //PORYGONLANG_SCRIPT_HPP
|