Work on extern support for userdata functions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-21 23:07:17 +02:00
parent 95c322ed2c
commit 694b0ac0c0
10 changed files with 42 additions and 12 deletions

View File

@@ -2,6 +2,7 @@
#include "NumericEvalValue.hpp"
#include "StringEvalValue.hpp"
#include <cstring>
#include <memory>
namespace Porygon::Evaluation {
@@ -26,6 +27,7 @@ namespace Porygon::Evaluation {
return v->EvaluateString()->c_str();
}
EvalValue *CreateIntegerEvalValue(long l) {
return new IntegerEvalValue(l);
}

View File

@@ -1,6 +1,3 @@
#include <utility>
#include <utility>
#ifndef PORYGONLANG_SCRIPTFUNCTIONEVALVALUE_HPP
#define PORYGONLANG_SCRIPTFUNCTIONEVALVALUE_HPP
@@ -10,7 +7,6 @@
#include "../../ScriptType.hpp"
#include "EvalValue.hpp"
#include "../../Binder/BoundStatements/BoundStatement.hpp"
#include "../Evaluator.hpp"
#include "../EvaluationScope/EvaluationScope.hpp"
using namespace std;

View File

@@ -285,8 +285,8 @@ namespace Porygon::Evaluation {
}
auto type = std::dynamic_pointer_cast<GenericFunctionScriptType>(function->GetType());
auto parameterTypes = type->GetParameterTypes();
if (type -> IsScriptFunction()){
auto parameterTypes = type->GetParameterTypes();
auto scriptFunctionType = std::dynamic_pointer_cast<FunctionScriptType>(type);
auto parameterKeys = scriptFunctionType->GetParameterKeys();
auto originalScope = this->_evaluationScope;