top | up | prev | next

CompoundStatementNode Class

Definition at line 61 of Statement.hpp

Constructors

CompoundStatementNode(const Span& span_)

Member Functions

void Accept(Visitor& visitor) override
void AddStatement(StatementNode* statement)
const Span& BeginBraceSpan() const
Node* Clone(CloneContext& cloneContext) const override
const Span& EndBraceSpan() const
void Read(AstReader& reader) override
void SetBeginBraceSpan(const Span& beginBraceSpan_)
void SetEndBraceSpan(const Span& endBraceSpan_)
NodeList<StatementNode>& Statements()
void Write(AstWriter& writer) override

Member Variables

Span beginBraceSpan
Span endBraceSpan
NodeList<StatementNode> statements

Constructor Details

CompoundStatementNode Constructor

sngcm::ast::CompoundStatementNode::CompoundStatementNode(const Span& span_)

Definition at line 99 of Statement.cpp :
  99 : StatementNode(NodeType::compoundStatementNodespan_)statements()beginBraceSpan()endBraceSpan()
 100 {
 101 }


Declaration at line 64 of Statement.hpp


Member Function Details

Accept Member Function

void sngcm::ast::CompoundStatementNode::Accept(Visitor & visitor) override

Definition at line 117 of Statement.cpp :
 118 {
 119     visitor.Visit(*this);
 120 }


Declaration at line 66 of Statement.hpp

Base class overridden functions: sngcm::ast::Node::Accept

Calls: sngcm::ast::Visitor::Visit

Called by: sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit


AddStatement Member Function

void sngcm::ast::CompoundStatementNode::AddStatement(StatementNode * statement)

Definition at line 139 of Statement.cpp :
 140 {
 141     statement->SetParent(this);
 142     statements.Add(statement);
 143 }


Declaration at line 69 of Statement.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::CompoundStatementNode::Clone


BeginBraceSpan Member Function

const Span& sngcm::ast::CompoundStatementNode::BeginBraceSpan() const

Definition at line 72 of Statement.hpp :
 72 { return beginBraceSpan; }


Clone Member Function

Node * sngcm::ast::CompoundStatementNode::Clone(CloneContext & cloneContext) const override

Definition at line 103 of Statement.cpp
Declaration at line 65 of Statement.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::CompoundStatementNode::AddStatement , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count


EndBraceSpan Member Function

const Span& sngcm::ast::CompoundStatementNode::EndBraceSpan() const

Definition at line 74 of Statement.hpp :
 74 { return endBraceSpan; }


Read Member Function

void sngcm::ast::CompoundStatementNode::Read(AstReader & reader) override

Definition at line 130 of Statement.cpp :
 131 {
 132     StatementNode::Read(reader);
 133     statements.Read(reader);
 134     statements.SetParent(this);
 135     beginBraceSpan = reader.ReadSpan();
 136     endBraceSpan = reader.ReadSpan();
 137 }


Declaration at line 68 of Statement.hpp

Base class overridden functions: sngcm::ast::Node::Read , sngcm::ast::StatementNode::Read

Calls: sngcm::ast::AstReader::ReadSpan , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , sngcm::ast::StatementNode::Read


SetBeginBraceSpan Member Function

void sngcm::ast::CompoundStatementNode::SetBeginBraceSpan(const Span& beginBraceSpan_)

Definition at line 71 of Statement.hpp :
 71 { beginBraceSpan = beginBraceSpan_; }


SetEndBraceSpan Member Function

void sngcm::ast::CompoundStatementNode::SetEndBraceSpan(const Span& endBraceSpan_)

Definition at line 73 of Statement.hpp :
 73 { endBraceSpan = endBraceSpan_; }


Statements Member Function

NodeList <StatementNode >& sngcm::ast::CompoundStatementNode::Statements()

Definition at line 70 of Statement.hpp :
 70 { return statements; }

Called by: sngcm::ast::SourceWriter::Visit


Write Member Function

void sngcm::ast::CompoundStatementNode::Write(AstWriter & writer) override

Definition at line 122 of Statement.cpp :
 123 {
 124     StatementNode::Write(writer);
 125     statements.Write(writer);
 126     writer.Write(beginBraceSpan);
 127     writer.Write(endBraceSpan);
 128 }


Declaration at line 67 of Statement.hpp

Base class overridden functions: sngcm::ast::Node::Write , sngcm::ast::StatementNode::Write

Calls: sngcm::ast::AstWriter::Write , sngcm::ast::NodeList::Write , sngcm::ast::StatementNode::Write


top | up | prev | next