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