Separate userdata collection handling
This commit is contained in:
parent
326a3c097a
commit
e7e5e64bbb
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Porygon{
|
|||
String,
|
||||
Function,
|
||||
UserData,
|
||||
UserDataCollection,
|
||||
Table,
|
||||
Any,
|
||||
};
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue