polserver/pol-core/bscript/compiler/ast/VariableBinding.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

27 lines
846 B
C++

#include "bscript/compiler/ast/VariableBinding.h"
#include "bscript/compiler/ast/Expression.h"
#include "bscript/compiler/ast/Node.h"
#include "bscript/compiler/ast/NodeVisitor.h"
#include "bscript/compiler/model/ScopableName.h"
namespace Pol::Bscript::Compiler
{
VariableBinding::VariableBinding( const SourceLocation& loc, std::string scope, std::string name,
bool rest )
: Node( loc ), scoped_name( std::move( scope ), std::move( name ) ), rest( rest ), variable()
{
}
void VariableBinding::accept( NodeVisitor& visitor )
{
visitor.visit_variable_binding( *this );
}
void VariableBinding::describe_to( std::string& w ) const
{
fmt::format_to( std::back_inserter( w ), "variable-binding({}{})", scoped_name.string(),
rest ? "..." : "" );
}
} // namespace Pol::Bscript::Compiler