top | up | prev | next

WhileStatementNode Class

Definition at line 112 of Statement.hpp

Constructors

WhileStatementNode()
WhileStatementNode(const Span& span_, Node* condition_, Node* statement_)

Member Functions

void Accept(Visitor& visitor) override
Node* Condition()
void Read(Reader& reader) override
Node* Statement()
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> condition
std::unique_ptr<Node> statement

Constructor Details

WhileStatementNode Constructor

sngcpp::ast::WhileStatementNode::WhileStatementNode()

Definition at line 206 of Statement.cpp :
206 : Node(NodeType::whileStatementNode)
207 {
208 }


Declaration at line 115 of Statement.hpp


WhileStatementNode Constructor

sngcpp::ast::WhileStatementNode::WhileStatementNode(const Span& span_, Node * condition_, Node * statement_)

Definition at line 210 of Statement.cpp :
210 : Node(NodeType::whileStatementNodespan_)condition(condition_)statement(statement_)
211 {
212 }


Declaration at line 116 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 214 of Statement.cpp :
215 {
216     visitor.Visit(*this);
217 }


Declaration at line 117 of Statement.hpp

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

Calls: sngcpp::ast::Visitor::Visit


Condition Member Function

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

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


Read Member Function

void sngcpp::ast::WhileStatementNode::Read(Reader & reader) override

Definition at line 226 of Statement.cpp :
227 {
228     Node::Read(reader);
229     condition.reset(reader.ReadNode());
230     statement.reset(reader.ReadNode());
231 }


Declaration at line 119 of Statement.hpp

Base class overridden functions: sngcpp::ast::Node::Read

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::ReadNode


Statement Member Function

Node * sngcpp::ast::WhileStatementNode::Statement()

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


Write Member Function

void sngcpp::ast::WhileStatementNode::Write(Writer & writer) override

Definition at line 219 of Statement.cpp :
220 {
221     Node::Write(writer);
222     condition->Write(writer);
223     statement->Write(writer);
224 }


Declaration at line 118 of Statement.hpp

Base class overridden functions: sngcpp::ast::Node::Write

Calls: sngcpp::ast::Node::Write , sngcpp::ast::WhileStatementNode::Write

Called by: sngcpp::ast::WhileStatementNode::Write


top | up | prev | next