Implemented generic for loops
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-26 16:19:34 +02:00
parent cfd558b718
commit d86e9ba8ae
18 changed files with 325 additions and 44 deletions

View File

@@ -2,11 +2,17 @@
#ifndef PORYGONLANG_EVALVALUE_HPP
#define PORYGONLANG_EVALVALUE_HPP
#include "../../ScriptType.hpp"
#include "../EvaluationException.hpp"
#include <string>
#include <sstream>
#include <memory>
#include "../../ScriptType.hpp"
#include "../EvaluationException.hpp"
namespace Porygon::Evaluation{
class EvalValue;
class Iterator;
}
#include "../Iterator/Iterator.hpp"
namespace Porygon::Evaluation {
class EvalValue {
@@ -54,6 +60,10 @@ namespace Porygon::Evaluation {
virtual void SetIndexValue(EvalValue *key, const shared_ptr<EvalValue> &value) const {
throw EvaluationException("Can't index this EvalValue");
}
virtual Iterator * GetKeyIterator() const{
throw EvaluationException("Can't iterate over this EvalValue");
}
};
class BooleanEvalValue : public EvalValue {