Cleans up basic library handling, implements print function
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-07-04 15:56:42 +02:00
parent db2d731b06
commit 5e02b6b389
7 changed files with 135 additions and 26 deletions

View File

@@ -24,10 +24,10 @@ namespace Porygon::Evaluation {
const std::shared_ptr<EvaluationScope> _scope;
public:
EvaluationScriptFunctionOption(const shared_ptr<BoundBlockStatement> innerBlock, const shared_ptr<EvaluationScope> scope)
: _innerBlock(innerBlock), _scope(scope) {
EvaluationScriptFunctionOption(shared_ptr<BoundBlockStatement> innerBlock, shared_ptr<EvaluationScope> scope)
: _innerBlock(std::move(innerBlock)), _scope(std::move(scope)) {
}
~EvaluationScriptFunctionOption() final = default;
const std::shared_ptr<BoundBlockStatement> &GetInnerBlock() const {
return _innerBlock;
@@ -36,15 +36,13 @@ namespace Porygon::Evaluation {
const std::shared_ptr<EvaluationScope> &GetScope() const {
return _scope;
}
};
class GenericFunctionEvalValue : public EvalValue{
protected:
const std::shared_ptr<GenericFunctionScriptType> _type;
const std::size_t _hash;
std::vector<shared_ptr<GenericFunctionOption>> _options;
const shared_ptr<GenericFunctionScriptType> _type;
const size_t _hash;
vector<shared_ptr<GenericFunctionOption>> _options;
public:
GenericFunctionEvalValue(shared_ptr<GenericFunctionScriptType> type, size_t hash)
: _type(move(type)),