2026-07-25 23:01:18 +02:00
|
|
|
#include "bscript/compiler/ast/FunctionReference.h"
|
2020-09-08 23:20:32 -07:00
|
|
|
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
2020-09-08 23:20:32 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
FunctionReference::FunctionReference( const SourceLocation& source_location, std::string name,
|
|
|
|
|
std::shared_ptr<FunctionLink> function_link )
|
2026-01-19 08:17:28 +01:00
|
|
|
: Value( source_location ),
|
|
|
|
|
name( std::move( name ) ),
|
|
|
|
|
function_link( std::move( function_link ) )
|
2020-09-08 23:20:32 -07:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FunctionReference::accept( NodeVisitor& visitor )
|
|
|
|
|
{
|
|
|
|
|
visitor.visit_function_reference( *this );
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-12 06:51:44 +01:00
|
|
|
void FunctionReference::describe_to( std::string& w ) const
|
2020-09-08 23:20:32 -07:00
|
|
|
{
|
2024-01-12 06:51:44 +01:00
|
|
|
fmt::format_to( std::back_inserter( w ), "function-reference(@{})", name );
|
2020-09-08 23:20:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|