mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Adds: - analyzer/FlowControlScope: Registers a break/continue scope - analyzer/FlowControlScopes: Registry for break/continue scopes - ast/LabelableStatement: Base class for AST nodes that can be labelled (loops and case) - ast/LoopStatement: Base class for AST nodes for loops (have a break and continue label) - ast/WhileLoop: AST node for a while loop
15 lines
372 B
C++
15 lines
372 B
C++
#include "LabelableStatement.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
LabelableStatement::LabelableStatement( const SourceLocation& source_location, std::string label )
|
|
: Statement( source_location ), label( std::move( label ) )
|
|
{
|
|
}
|
|
|
|
void LabelableStatement::relabel( std::string new_label )
|
|
{
|
|
label = std::move( new_label );
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|