top | up | prev | next

WhileStatementNode Class

Definition at line 141 of Statement.hpp

Constructors

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

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_)
const StatementNode* Statement() const
StatementNode* Statement()
void Write(AstWriter& writer) override

Member Variables

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

Constructor Details

WhileStatementNode Constructor

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

Definition at line 285 of Statement.cpp :
 285 :
 286 StatementNode(NodeType::whileStatementNodespan_moduleId_)condition()statement()
 287 {
 288 }


Declaration at line 144 of Statement.hpp


WhileStatementNode Constructor

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

Definition at line 290 of Statement.cpp :
 290 :
 291 StatementNode(NodeType::whileStatementNodespan_moduleId_)condition(condition_)statement(statement_)
 292 {
 293     condition->SetParent(this);
 294     statement->SetParent(this);
 295 }


Declaration at line 145 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 305 of Statement.cpp :
 306 {
 307     visitor.Visit(*this);
 308 }


Declaration at line 147 of Statement.hpp

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

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


Clone Member Function

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

Definition at line 297 of Statement.cpp :
 298 {
 299     WhileStatementNode* clone = new WhileStatementNode(GetSpan()ModuleId()condition->Clone(cloneContext)static_cast<StatementNode*>(statement->Clone(cloneContext)));
 300     clone->SetLeftParenSpan(leftParenSpan);
 301     clone->SetRightParenSpan(rightParenSpan);
 302     return clone;
 303 }


Declaration at line 146 of Statement.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::WhileStatementNode::Clone , sngcm::ast::WhileStatementNode::SetLeftParenSpan , sngcm::ast::WhileStatementNode::SetRightParenSpan

Called by: sngcm::ast::WhileStatementNode::Clone


Condition Member Function

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

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


Condition Member Function

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

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

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


IsBreakEnclosingStatementNode Member Function

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

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

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


IsContinueEnclosingStatementNode Member Function

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

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

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


LeftParenSpan Member Function

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

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


Read Member Function

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

Definition at line 320 of Statement.cpp :
 321 {
 322     StatementNode::Read(reader);
 323     condition.reset(reader.ReadNode());
 324     condition->SetParent(this);
 325     statement.reset(reader.ReadStatementNode());
 326     statement->SetParent(this);
 327     leftParenSpan = reader.ReadSpan();
 328     rightParenSpan = reader.ReadSpan();
 329 }


Declaration at line 149 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::WhileStatementNode::RightParenSpan() const

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


SetLeftParenSpan Member Function

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

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

Called by: sngcm::ast::WhileStatementNode::Clone


SetRightParenSpan Member Function

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

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

Called by: sngcm::ast::WhileStatementNode::Clone


Statement Member Function

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

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


Statement Member Function

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

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

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


Write Member Function

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

Definition at line 310 of Statement.cpp :
 311 {
 312     StatementNode::Write(writer);
 313     writer.Write(condition.get());
 314     writer.Write(statement.get());
 315     bool convertExternal = ModuleId() == writer.SpanConversionModuleId();
 316     writer.Write(leftParenSpanconvertExternal);
 317     writer.Write(rightParenSpanconvertExternal);
 318 }


Declaration at line 148 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