polserver/pol-core/bscript/compiler/ast/ProgramParameterDeclaration.cpp
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00

28 lines
808 B
C++

#include "bscript/compiler/ast/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