top | up | prev | next

DoStatementNode Class

Definition at line 127 of Statement.hpp

Constructors

DoStatementNode()
DoStatementNode(const Span& span_, Node* statement_, Node* condition_, const Span& whileSpan_)

Member Functions

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

Member Variables

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

Constructor Details

DoStatementNode Constructor

sngcpp::ast::DoStatementNode::DoStatementNode()

Definition at line 233 of Statement.cpp :
233 : Node(NodeType::doStatementNode)
234 {
235 }


Declaration at line 130 of Statement.hpp


DoStatementNode Constructor

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

Definition at line 237 of Statement.cpp :
237 :
238 Node(NodeType::doStatementNodespan_)statement(statement_)condition(condition_)whileSpan(whileSpan_)
239 {
240 }


Declaration at line 131 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 242 of Statement.cpp :
243 {
244     visitor.Visit(*this);
245 }


Declaration at line 132 of Statement.hpp

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

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


Condition Member Function

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

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


Read Member Function

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

Definition at line 255 of Statement.cpp :
256 {
257     Node::Read(reader);
258     statement.reset(reader.ReadNode());
259     condition.reset(reader.ReadNode());
260     reader.Read(whileSpan);
261 }


Declaration at line 134 of Statement.hpp

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

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


Statement Member Function

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

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


WhileSpan Member Function

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

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


Write Member Function

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

Definition at line 247 of Statement.cpp :
248 {
249     Node::Write(writer);
250     statement->Write(writer);
251     condition->Write(writer);
252     writer.Write(whileSpan);
253 }


Declaration at line 133 of Statement.hpp

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

Calls: sngcpp::ast::DoStatementNode::Write , sngcpp::ast::Node::Write , sngcpp::ast::Writer::Write

Called by: sngcpp::ast::DoStatementNode::Write


top | up | prev | next