Make crosslang more type safe

This commit is contained in:
2025-09-23 20:28:40 -05:00
parent c9b0578100
commit 026a9e9b49
11 changed files with 708 additions and 531 deletions

View File

@@ -8,6 +8,16 @@ namespace Tesses::CrossLang
for(auto& item : this->inherit_tree) type += " : " + item;
return type;
}
TObject TClassObject::CallMethod(GCList& ls, std::string className, std::string name,std::vector<TObject> args)
{
auto value = this->GetValue(className,name);
TCallable* callable;
if(GetObjectHeap(value, callable))
{
return callable->Call(ls,args);
}
return Undefined();
}
TClassObjectEntry* TClassObject::GetEntry(std::string classN, std::string key)
{
for(auto& item : this->entries)

View File

@@ -72,4 +72,4 @@ namespace Tesses::CrossLang
this->Destroy();
}
}
}