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

41 lines
1.1 KiB
C++

#include "bscript/compiler/ast/CaseDispatchGroup.h"
#include "bscript/compiler/ast/Block.h"
#include "bscript/compiler/ast/CaseDispatchSelectors.h"
#include "bscript/compiler/ast/NodeVisitor.h"
#include "bscript/compiler/model/FlowControlLabel.h"
namespace Pol::Bscript::Compiler
{
CaseDispatchGroup::CaseDispatchGroup( const SourceLocation& source_location,
std::unique_ptr<CaseDispatchSelectors> selectors,
std::unique_ptr<Block> block )
: Node( source_location ), break_label( std::make_shared<FlowControlLabel>() )
{
children.reserve( 2 );
children.push_back( std::move( selectors ) );
children.push_back( std::move( block ) );
}
void CaseDispatchGroup::accept( NodeVisitor& visitor )
{
visitor.visit_case_dispatch_group( *this );
}
void CaseDispatchGroup::describe_to( std::string& w ) const
{
w += "case-dispatch-group";
}
CaseDispatchSelectors& CaseDispatchGroup::selectors()
{
return child<CaseDispatchSelectors>( 0 );
}
Block& CaseDispatchGroup::block()
{
return child<Block>( 1 );
}
} // namespace Pol::Bscript::Compiler