Work to add C style entry points to library that allow most functionality
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#include <utility>
|
||||
|
||||
|
||||
#ifndef PORYGONLANG_SCRIPT_HPP
|
||||
#define PORYGONLANG_SCRIPT_HPP
|
||||
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "Diagnostics/Diagnostics.hpp"
|
||||
@@ -19,14 +17,12 @@ using namespace std;
|
||||
class Script {
|
||||
friend class Evaluator;
|
||||
|
||||
shared_ptr<EvalValue> _lastValue;
|
||||
Evaluator* _evaluator;
|
||||
unordered_map<int, shared_ptr<EvalValue>>* _scriptVariables;
|
||||
BoundScriptStatement* _boundScript;
|
||||
|
||||
explicit Script();
|
||||
|
||||
void Parse(string script);
|
||||
BoundScriptStatement* BoundScript;
|
||||
public:
|
||||
static Script* Create(string script);
|
||||
Diagnostics* Diagnostics;
|
||||
@@ -35,12 +31,12 @@ public:
|
||||
|
||||
void Evaluate();
|
||||
|
||||
EvalValue* GetLastValue(){
|
||||
return _lastValue.get();
|
||||
};
|
||||
EvalValue* GetLastValue();
|
||||
|
||||
EvalValue* GetVariable(const string& key);
|
||||
bool HasVariable(const string& key);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user