polserver/pol-core/bscript/compiler/ast/ProgramParameterDeclaration.cpp
turleypol d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00

28 lines
787 B
C++

#include "ProgramParameterDeclaration.h"
#include <utility>
#include "bscript/compiler/ast/NodeVisitor.h"
namespace Pol::Bscript::Compiler
{
ProgramParameterDeclaration::ProgramParameterDeclaration( const SourceLocation& source_location,
std::string name, bool unused )
: Node( source_location ), name( std::move( name ) ), unused( unused )
{
}
void ProgramParameterDeclaration::accept( NodeVisitor& visitor )
{
visitor.visit_program_parameter_declaration( *this );
}
void ProgramParameterDeclaration::describe_to( std::string& w ) const
{
fmt::format_to( std::back_inserter( w ), "program-parameter-declaration({}", name );
if ( unused )
w += ", unused";
w += ")";
}
} // namespace Pol::Bscript::Compiler