top | up | prev | next

CompoundStatementNode Class

Definition at line 70 of Statement.hpp

Constructors

CompoundStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)

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_)
void SetTracerInserted()
NodeList<StatementNode>& Statements()
bool TracerInserted() const
void Write(AstWriter& writer) override

Member Variables

Span beginBraceSpan
Span endBraceSpan
NodeList<StatementNode> statements
bool tracerInserted

Constructor Details

CompoundStatementNode Constructor

sngcm::ast::CompoundStatementNode::CompoundStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 115 of Statement.cpp :
 115 :
 116 StatementNode(NodeType::compoundStatementNodespan_moduleId_)statements()beginBraceSpan()endBraceSpan()tracerInserted(false)
 117 {
 118 }


Declaration at line 73 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 134 of Statement.cpp :
 135 {
 136     visitor.Visit(*this);
 137 }


Declaration at line 75 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 157 of Statement.cpp :
 158 {
 159     statement->SetParent(this);
 160     statements.Add(statement);
 161 }


Declaration at line 78 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 81 of Statement.hpp :
 81 { return beginBraceSpan; }


Clone Member Function

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

Definition at line 120 of Statement.cpp
Declaration at line 74 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::Node::ModuleId , sngcm::ast::NodeList::Count


EndBraceSpan Member Function

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

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


Read Member Function

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

Definition at line 148 of Statement.cpp :
 149 {
 150     StatementNode::Read(reader);
 151     statements.Read(reader);
 152     statements.SetParent(this);
 153     beginBraceSpan = reader.ReadSpan();
 154     endBraceSpan = reader.ReadSpan();
 155 }


Declaration at line 77 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 80 of Statement.hpp :
 80 { beginBraceSpan = beginBraceSpan_; }


SetEndBraceSpan Member Function

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

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


SetTracerInserted Member Function

void sngcm::ast::CompoundStatementNode::SetTracerInserted()

Definition at line 85 of Statement.hpp :
 85 { tracerInserted = true; }


Statements Member Function

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

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

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


TracerInserted Member Function

bool sngcm::ast::CompoundStatementNode::TracerInserted() const

Definition at line 84 of Statement.hpp :
 84 { return tracerInserted; }


Write Member Function

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

Definition at line 139 of Statement.cpp :
 140 {
 141     StatementNode::Write(writer);
 142     statements.Write(writer);
 143     bool convertExternal = ModuleId() == writer.SpanConversionModuleId();
 144     writer.Write(beginBraceSpanconvertExternal);
 145     writer.Write(endBraceSpanconvertExternal);
 146 }


Declaration at line 76 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::SpanConversionModuleId , sngcm::ast::AstWriter::Write , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Write , sngcm::ast::StatementNode::Write


top | up | prev | next