Implements parsing of function calling

This commit is contained in:
2019-06-01 14:56:28 +02:00
parent 1231a77761
commit 8b70eed516
5 changed files with 59 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
#ifndef PORYGONLANG_SCRIPTFUNCTIONEVALVALUE_HPP
#define PORYGONLANG_SCRIPTFUNCTIONEVALVALUE_HPP
#include <memory>
#include <utility>
#include "../../ScriptType.hpp"
#include "EvalValue.hpp"
#include "../../Binder/BoundStatements/BoundStatement.hpp"
@@ -13,10 +13,10 @@ class ScriptFunctionEvalValue : public EvalValue{
std::shared_ptr<BoundBlockStatement> _innerBlock;
FunctionScriptType _type;
public:
explicit ScriptFunctionEvalValue(std::shared_ptr<BoundBlockStatement> innerBlock, const FunctionScriptType& type)
: _type(type)
explicit ScriptFunctionEvalValue(std::shared_ptr<BoundBlockStatement> innerBlock, FunctionScriptType type)
: _type(std::move(type))
{
_innerBlock = innerBlock;
_innerBlock = std::move(innerBlock);
}
EvalValue* Clone() final{