mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
32 lines
1,019 B
C++
32 lines
1,019 B
C++
|
|
#include "UninitializedFunctionDeclaration.h"
|
||
|
|
|
||
|
|
#include <utility>
|
||
|
|
|
||
|
|
#include "bscript/compiler/ast/FunctionParameterDeclaration.h"
|
||
|
|
#include "bscript/compiler/ast/FunctionParameterList.h"
|
||
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
||
|
|
|
||
|
|
namespace Pol::Bscript::Compiler
|
||
|
|
{
|
||
|
|
UninitializedFunctionDeclaration::UninitializedFunctionDeclaration(
|
||
|
|
const SourceLocation& source_location, UserFunctionType type, std::string scope,
|
||
|
|
std::string name, std::unique_ptr<FunctionParameterList> parameter_list )
|
||
|
|
: Function( source_location, std::move( scope ), std::move( name ),
|
||
|
|
std::move( parameter_list ) ),
|
||
|
|
type( type )
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
void UninitializedFunctionDeclaration::accept( NodeVisitor& visitor )
|
||
|
|
{
|
||
|
|
visitor.visit_uninitialized_function_declaration( *this );
|
||
|
|
}
|
||
|
|
|
||
|
|
void UninitializedFunctionDeclaration::describe_to( std::string& w ) const
|
||
|
|
{
|
||
|
|
fmt::format_to( std::back_inserter( w ), "uninitialized-function-declaration({}::{})", scope,
|
||
|
|
name );
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace Pol::Bscript::Compiler
|