top | up | prev | next

DoStatementNode Class

Definition at line 155 of Statement.hpp

Constructors

DoStatementNode(const Span& span_)
DoStatementNode(const Span& span_, 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_)

Definition at line 307 of Statement.cpp :
 307 : StatementNode(NodeType::doStatementNodespan_)statement()condition()
 308 {
 309 }


Declaration at line 158 of Statement.hpp


DoStatementNode Constructor

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

Definition at line 311 of Statement.cpp :
 311 : StatementNode(NodeType::doStatementNodespan_)statement(statement_)condition(condition_)
 312 {
 313     statement->SetParent(this);
 314     condition->SetParent(this);
 315 }


Declaration at line 159 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 326 of Statement.cpp :
 327 {
 328     visitor.Visit(*this);
 329 }


Declaration at line 161 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 317 of Statement.cpp :
 318 {
 319     DoStatementNode* clone = new DoStatementNode(GetSpan()static_cast<StatementNode*>(statement->Clone(cloneContext))condition->Clone(cloneContext));
 320     clone->SetWhileSpan(whileSpan);
 321     clone->SetLeftParenSpan(leftParenSpan);
 322     clone->SetRightParenSpan(rightParenSpan);
 323     return clone;
 324 }


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

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


Condition Member Function

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

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


Condition Member Function

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

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

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


IsBreakEnclosingStatementNode Member Function

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

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

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


IsContinueEnclosingStatementNode Member Function

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

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

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


LeftParenSpan Member Function

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

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


Read Member Function

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

Definition at line 341 of Statement.cpp :
 342 {
 343     StatementNode::Read(reader);
 344     statement.reset(reader.ReadStatementNode());
 345     statement->SetParent(this);
 346     condition.reset(reader.ReadNode());
 347     condition->SetParent(this);
 348     whileSpan = reader.ReadSpan();
 349     leftParenSpan = reader.ReadSpan();
 350     rightParenSpan = reader.ReadSpan();
 351 }


Declaration at line 163 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 175 of Statement.hpp :
175 { return rightParenSpan; }


SetLeftParenSpan Member Function

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

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

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


SetRightParenSpan Member Function

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

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

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


SetWhileSpan Member Function

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

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

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


Statement Member Function

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

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


Statement Member Function

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

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

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


WhileSpan Member Function

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

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


Write Member Function

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

Definition at line 331 of Statement.cpp :
 332 {
 333     StatementNode::Write(writer);
 334     writer.Write(statement.get());
 335     writer.Write(condition.get());
 336     writer.Write(whileSpan);
 337     writer.Write(leftParenSpan);
 338     writer.Write(rightParenSpan);
 339 }


Declaration at line 162 of Statement.hpp

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

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


top | up | prev | next