mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* 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
28 lines
787 B
C++
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
|