top | up | prev | next

ForStatementNode Class

Definition at line 184 of Statement.hpp

Constructors

ForStatementNode(const Span& span_)
ForStatementNode(const Span& span_, StatementNode* initS_, Node* condition_, StatementNode* loopS_, StatementNode* actionS_)

Member Functions

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

Member Variables

std::unique_ptr<StatementNode> actionS
std::unique_ptr<Node> condition
std::unique_ptr<StatementNode> initS
Span leftParenSpan
std::unique_ptr<StatementNode> loopS
Span rightParenSpan

Constructor Details

ForStatementNode Constructor

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

Definition at line 353 of Statement.cpp :
 353 : StatementNode(NodeType::forStatementNodespan_)initS()condition()loopS()actionS()
 354 {
 355 }


Declaration at line 187 of Statement.hpp


ForStatementNode Constructor

sngcm::ast::ForStatementNode::ForStatementNode(const Span& span_, StatementNode * initS_, Node * condition_, StatementNode * loopS_, StatementNode * actionS_)

Definition at line 357 of Statement.cpp
Declaration at line 188 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 383 of Statement.cpp :
 384 {
 385     visitor.Visit(*this);
 386 }


Declaration at line 190 of Statement.hpp

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

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


ActionS Member Function

const StatementNode * sngcm::ast::ForStatementNode::ActionS() const

Definition at line 201 of Statement.hpp :
201 { return actionS.get(); }


ActionS Member Function

StatementNode * sngcm::ast::ForStatementNode::ActionS()

Definition at line 202 of Statement.hpp :
202 { return actionS.get(); }

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


Clone Member Function

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

Definition at line 369 of Statement.cpp
Declaration at line 189 of Statement.hpp

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

Calls: sngcm::ast::ForStatementNode::Clone , sngcm::ast::ForStatementNode::SetLeftParenSpan , sngcm::ast::ForStatementNode::SetRightParenSpan , sngcm::ast::Node::GetSpan

Called by: sngcm::ast::ForStatementNode::Clone


Condition Member Function

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

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


Condition Member Function

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

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

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


InitS Member Function

const StatementNode * sngcm::ast::ForStatementNode::InitS() const

Definition at line 195 of Statement.hpp :
195 { return initS.get(); }


InitS Member Function

StatementNode * sngcm::ast::ForStatementNode::InitS()

Definition at line 196 of Statement.hpp :
196 { return initS.get(); }

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


IsBreakEnclosingStatementNode Member Function

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

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

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


IsContinueEnclosingStatementNode Member Function

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

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

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


LeftParenSpan Member Function

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

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


LoopS Member Function

const StatementNode * sngcm::ast::ForStatementNode::LoopS() const

Definition at line 199 of Statement.hpp :
199 { return loopS.get(); }


LoopS Member Function

StatementNode * sngcm::ast::ForStatementNode::LoopS()

Definition at line 200 of Statement.hpp :
200 { return loopS.get(); }

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


Read Member Function

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

Definition at line 404 of Statement.cpp
Declaration at line 192 of Statement.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::AstReader::ReadStatementNode , sngcm::ast::Node::SetParent , sngcm::ast::StatementNode::Read , soulng::util::BinaryReader::ReadBool


RightParenSpan Member Function

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

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


SetLeftParenSpan Member Function

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

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

Called by: sngcm::ast::ForStatementNode::Clone


SetRightParenSpan Member Function

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

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

Called by: sngcm::ast::ForStatementNode::Clone


Write Member Function

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

Definition at line 388 of Statement.cpp
Declaration at line 191 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::AstWriter::Write , sngcm::ast::StatementNode::Write , soulng::util::BinaryWriter::Write


top | up | prev | next