Large overhaul of pointers to shared_ptrs, implemented function evaluation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user