2026-07-25 23:01:18 +02:00
|
|
|
#include "bscript/compiler/ast/ModuleFunctionDeclaration.h"
|
2020-08-23 15:01:39 -07:00
|
|
|
|
2024-01-16 17:55:42 +01:00
|
|
|
|
2020-08-23 15:01:39 -07:00
|
|
|
#include <utility>
|
|
|
|
|
|
2021-02-25 16:53:22 +01:00
|
|
|
#include "bscript/compiler/ast/FunctionParameterDeclaration.h"
|
|
|
|
|
#include "bscript/compiler/ast/FunctionParameterList.h"
|
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
2020-08-23 15:01:39 -07:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
ModuleFunctionDeclaration::ModuleFunctionDeclaration(
|
|
|
|
|
const SourceLocation& source_location, std::string module_name, std::string name,
|
|
|
|
|
std::unique_ptr<FunctionParameterList> parameter_list )
|
2024-08-11 23:01:38 +02:00
|
|
|
: Function( source_location, std::move( module_name ), std::move( name ),
|
|
|
|
|
std::move( parameter_list ) )
|
2020-08-23 15:01:39 -07:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ModuleFunctionDeclaration::accept( NodeVisitor& visitor )
|
|
|
|
|
{
|
|
|
|
|
visitor.visit_module_function_declaration( *this );
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-12 06:51:44 +01:00
|
|
|
void ModuleFunctionDeclaration::describe_to( std::string& w ) const
|
2020-08-23 15:01:39 -07:00
|
|
|
{
|
2024-08-11 23:01:38 +02:00
|
|
|
fmt::format_to( std::back_inserter( w ), "module-function-declaration({}::{})", scope, name );
|
2020-08-23 15:01:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|