diff --git a/src/ScriptTypes/ScriptType.cpp b/src/ScriptTypes/ScriptType.cpp index b9ce364..b97c7a8 100644 --- a/src/ScriptTypes/ScriptType.cpp +++ b/src/ScriptTypes/ScriptType.cpp @@ -75,6 +75,7 @@ namespace Porygon{ case TypeClass::String: return "string"; case TypeClass::Function: return "function"; case TypeClass::UserData: return "userdata"; + case TypeClass::UserDataCollection: return "userdata-collection"; case TypeClass::Table: return "table"; case TypeClass::Any: return "all"; } diff --git a/src/ScriptTypes/ScriptType.hpp b/src/ScriptTypes/ScriptType.hpp index 62844a7..f1a5c9d 100644 --- a/src/ScriptTypes/ScriptType.hpp +++ b/src/ScriptTypes/ScriptType.hpp @@ -18,6 +18,7 @@ namespace Porygon{ String, Function, UserData, + UserDataCollection, Table, Any, }; diff --git a/src/StandardLibraries/BasicLibrary.hpp b/src/StandardLibraries/BasicLibrary.hpp index 4850882..9c22e6a 100644 --- a/src/StandardLibraries/BasicLibrary.hpp +++ b/src/StandardLibraries/BasicLibrary.hpp @@ -107,6 +107,7 @@ namespace Porygon::StandardLibraries{ case TypeClass::String: return new Evaluation::StringEvalValue(u"string"); case TypeClass::Function: return new Evaluation::StringEvalValue(u"function"); case TypeClass::UserData: return new Evaluation::StringEvalValue(u"userdata"); + case TypeClass::UserDataCollection: return new Evaluation::StringEvalValue(u"userdata-collection"); case TypeClass::Table: return new Evaluation::StringEvalValue(u"table"); case TypeClass::Any: return new Evaluation::StringEvalValue(u"all"); } diff --git a/src/UserData/UserDataCollections/UserDataCollectionValue.hpp b/src/UserData/UserDataCollections/UserDataCollectionValue.hpp index c027f40..4a4616f 100644 --- a/src/UserData/UserDataCollections/UserDataCollectionValue.hpp +++ b/src/UserData/UserDataCollections/UserDataCollectionValue.hpp @@ -60,7 +60,7 @@ namespace Porygon::UserData { [[nodiscard]] TypeClass GetTypeClass() const final{ - return TypeClass ::Table; + return TypeClass ::UserDataCollection; } bool operator==(const EvalValue *b) const final{