polserver/pol-core/bscript/compiler/ast/LabelableStatement.cpp
Eric Swanson 1a3619b231
Add support for while loops (#268)
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
2020-09-03 19:46:27 -07:00

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