Large overhaul of pointers to shared_ptrs, implemented function evaluation

This commit is contained in:
2019-06-01 19:20:31 +02:00
parent 8b70eed516
commit 4408cf00cd
17 changed files with 261 additions and 129 deletions

View File

@@ -8,9 +8,9 @@
class BoundFunctionDeclarationStatement : public BoundStatement{
BoundVariableKey* _key;
std::shared_ptr<BoundBlockStatement> _block;
FunctionScriptType* _type;
std::shared_ptr<FunctionScriptType> _type;
public:
BoundFunctionDeclarationStatement(FunctionScriptType* type, BoundVariableKey* key, BoundBlockStatement* block){
BoundFunctionDeclarationStatement(std::shared_ptr<FunctionScriptType> type, BoundVariableKey* key, BoundBlockStatement* block){
_key = key;
_block = shared_ptr<BoundBlockStatement>(block);
_type = type;
@@ -18,7 +18,6 @@ public:
~BoundFunctionDeclarationStatement() final{
delete _key;
delete _type;
}
BoundStatementKind GetKind() final{
@@ -33,7 +32,7 @@ public:
return _block;
}
FunctionScriptType* GetType(){
std::shared_ptr<FunctionScriptType> GetType(){
return _type;
}
};