44 std::unique_ptr<SymbolTable>
symbols =
nullptr)
47 , fChildren(
std::move(statements))
55 std::unique_ptr<SymbolTable>
symbols =
nullptr);
62 std::unique_ptr<Statement> additional);
69 std::unique_ptr<SymbolTable>
symbols =
nullptr);
80 return fBlockKind == Kind::kBracedScope;
92 return fSymbolTable.get();
96 for (
const std::unique_ptr<Statement>& stmt : this->
children()) {
97 if (!stmt->isEmpty()) {
107 std::unique_ptr<SymbolTable> fSymbolTable;
bool isEmpty() const override
static std::unique_ptr< Statement > MakeCompoundStatement(std::unique_ptr< Statement > existing, std::unique_ptr< Statement > additional)
const StatementArray & children() const
static constexpr Kind kIRNodeKind
Block(Position pos, StatementArray statements, Kind kind=Kind::kBracedScope, std::unique_ptr< SymbolTable > symbols=nullptr)
std::string description() const override
static std::unique_ptr< Statement > Make(Position pos, StatementArray statements, Kind kind=Kind::kBracedScope, std::unique_ptr< SymbolTable > symbols=nullptr)
StatementArray & children()
void setBlockKind(Kind kind)
static std::unique_ptr< Block > MakeBlock(Position pos, StatementArray statements, Kind kind=Kind::kBracedScope, std::unique_ptr< SymbolTable > symbols=nullptr)
SymbolTable * symbolTable() const
Statement(Position pos, Kind kind)