mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Associate class descriptor with class instance * Skeleton of BClassInstance, update tests * Correctly handle methods on class instances * Support calling members as methods * Update super-multiple test * Track called ctors; Introduce ins_check_mro * Move class method funcref class to Executor * Address GitHub CI annotations - 'argument': conversion from 'size_t' to 'unsigned int' * Update pol-core/bscript/bclassinstance.cpp * Introduce BConstObject for class instances * Fix unnecessary include in uotool * Removed fixedalloc from BConstObject * Additional test case * Address Discord comments - Reintroduce deleted copy assignment
23 lines
588 B
C++
23 lines
588 B
C++
#include "ClassInstance.h"
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
ClassInstance::ClassInstance( const SourceLocation& source_location,
|
|
ClassDeclaration* class_declaration )
|
|
: Expression( source_location ), class_declaration( class_declaration )
|
|
{
|
|
}
|
|
|
|
void ClassInstance::accept( NodeVisitor& visitor )
|
|
{
|
|
visitor.visit_class_instance( *this );
|
|
}
|
|
|
|
void ClassInstance::describe_to( std::string& w ) const
|
|
{
|
|
fmt::format_to( std::back_inserter( w ), "class-instance" );
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|