top | up | prev | next

DoStatementNode Class

Definition at line 167 of Statement.hpp

Constructors

DoStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)
DoStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, StatementNode* statement_, Node* condition_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const Node* Condition() const
Node* Condition()
bool IsBreakEnclosingStatementNode() const override
bool IsContinueEnclosingStatementNode() const override
const Span& LeftParenSpan() const
void Read(AstReader& reader) override
const Span& RightParenSpan() const
void SetLeftParenSpan(const Span& leftParenSpan_)
void SetRightParenSpan(const Span& rightParenSpan_)
void SetWhileSpan(const Span& whileSpan_)
const StatementNode* Statement() const
StatementNode* Statement()
const Span& WhileSpan() const
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> condition
Span leftParenSpan
Span rightParenSpan
std::unique_ptr<StatementNode> statement
Span whileSpan

Constructor Details

DoStatementNode Constructor

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

Definition at line 331 of Statement.cpp :
 331 :
 332 StatementNode(NodeType::doStatementNodespan_moduleId_)statement()condition()
 333 {
 334 }


Declaration at line 170 of Statement.hpp


DoStatementNode Constructor

sngcm::ast::DoStatementNode::DoStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, StatementNode * statement_, Node * condition_)

Definition at line 336 of Statement.cpp :
 336 :
 337 StatementNode(NodeType::doStatementNodespan_moduleId_)statement(statement_)condition(condition_)
 338 {
 339     statement->SetParent(this);
 340     condition->SetParent(this);
 341 }


Declaration at line 171 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 352 of Statement.cpp :
 353 {
 354     visitor.Visit(*this);
 355 }


Declaration at line 173 of Statement.hpp

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

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


Clone Member Function

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

Definition at line 343 of Statement.cpp :
 344 {
 345     DoStatementNode* clone = new DoStatementNode(GetSpan()ModuleId()static_cast<StatementNode*>(statement->Clone(cloneContext))condition->Clone(cloneContext));
 346     clone->SetWhileSpan(whileSpan);
 347     clone->SetLeftParenSpan(leftParenSpan);
 348     clone->SetRightParenSpan(rightParenSpan);
 349     return clone;
 350 }


Declaration at line 172 of Statement.hpp

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

Calls: sngcm::ast::DoStatementNode::Clone , sngcm::ast::DoStatementNode::SetLeftParenSpan , sngcm::ast::DoStatementNode::SetRightParenSpan , sngcm::ast::DoStatementNode::SetWhileSpan , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId

Called by: sngcm::ast::DoStatementNode::Clone


Condition Member Function

const Node * sngcm::ast::DoStatementNode::Condition() const

Definition at line 180 of Statement.hpp :
180 { return condition.get(); }


Condition Member Function

Node * sngcm::ast::DoStatementNode::Condition()

Definition at line 181 of Statement.hpp :
181 { return condition.get(); }

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


IsBreakEnclosingStatementNode Member Function

bool sngcm::ast::DoStatementNode::IsBreakEnclosingStatementNode() const override

Definition at line 176 of Statement.hpp :
176 { return true; }

Base class overridden functions: sngcm::ast::StatementNode::IsBreakEnclosingStatementNode


IsContinueEnclosingStatementNode Member Function

bool sngcm::ast::DoStatementNode::IsContinueEnclosingStatementNode() const override

Definition at line 177 of Statement.hpp :
177 { return true; }

Base class overridden functions: sngcm::ast::StatementNode::IsContinueEnclosingStatementNode


LeftParenSpan Member Function

const Span& sngcm::ast::DoStatementNode::LeftParenSpan() const

Definition at line 185 of Statement.hpp :
185 { return leftParenSpan; }


Read Member Function

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

Definition at line 368 of Statement.cpp :
 369 {
 370     StatementNode::Read(reader);
 371     statement.reset(reader.ReadStatementNode());
 372     statement->SetParent(this);
 373     condition.reset(reader.ReadNode());
 374     condition->SetParent(this);
 375     whileSpan = reader.ReadSpan();
 376     leftParenSpan = reader.ReadSpan();
 377     rightParenSpan = reader.ReadSpan();
 378 }


Declaration at line 175 of Statement.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::AstReader::ReadStatementNode , sngcm::ast::Node::SetParent , sngcm::ast::StatementNode::Read


RightParenSpan Member Function

const Span& sngcm::ast::DoStatementNode::RightParenSpan() const

Definition at line 187 of Statement.hpp :
187 { return rightParenSpan; }


SetLeftParenSpan Member Function

void sngcm::ast::DoStatementNode::SetLeftParenSpan(const Span& leftParenSpan_)

Definition at line 184 of Statement.hpp :
184 { leftParenSpan = leftParenSpan_; }

Called by: sngcm::ast::DoStatementNode::Clone


SetRightParenSpan Member Function

void sngcm::ast::DoStatementNode::SetRightParenSpan(const Span& rightParenSpan_)

Definition at line 186 of Statement.hpp :
186 { rightParenSpan = rightParenSpan_; }

Called by: sngcm::ast::DoStatementNode::Clone


SetWhileSpan Member Function

void sngcm::ast::DoStatementNode::SetWhileSpan(const Span& whileSpan_)

Definition at line 182 of Statement.hpp :
182 { whileSpan = whileSpan_; }

Called by: sngcm::ast::DoStatementNode::Clone


Statement Member Function

const StatementNode * sngcm::ast::DoStatementNode::Statement() const

Definition at line 178 of Statement.hpp :
178 { return statement.get(); }


Statement Member Function

StatementNode * sngcm::ast::DoStatementNode::Statement()

Definition at line 179 of Statement.hpp :
179 { return statement.get(); }

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


WhileSpan Member Function

const Span& sngcm::ast::DoStatementNode::WhileSpan() const

Definition at line 183 of Statement.hpp :
183 { return whileSpan; }


Write Member Function

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

Definition at line 357 of Statement.cpp :
 358 {
 359     StatementNode::Write(writer);
 360     writer.Write(statement.get());
 361     writer.Write(condition.get());
 362     bool convertExternal = ModuleId() == writer.SpanConversionModuleId();
 363     writer.Write(whileSpanconvertExternal);
 364     writer.Write(leftParenSpanconvertExternal);
 365     writer.Write(rightParenSpanconvertExternal);
 366 }


Declaration at line 174 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::StatementNode::Write


top | up | prev | next