top | up | prev | next

SwitchStatementNode Class

Definition at line 97 of Statement.hpp

Constructors

SwitchStatementNode()
SwitchStatementNode(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

SwitchStatementNode Constructor

sngcpp::ast::SwitchStatementNode::SwitchStatementNode()

Definition at line 179 of Statement.cpp :
179 : Node(NodeType::switchStatementNode)
180 {
181 }


Declaration at line 100 of Statement.hpp


SwitchStatementNode Constructor

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

Definition at line 183 of Statement.cpp :
183 : Node(NodeType::switchStatementNodespan_)condition(condition_)statement(statement_)
184 {
185 }


Declaration at line 101 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 187 of Statement.cpp :
188 {
189     visitor.Visit(*this);
190 }


Declaration at line 102 of Statement.hpp

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

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


Condition Member Function

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

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


Read Member Function

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

Definition at line 199 of Statement.cpp :
200 {
201     Node::Read(reader);
202     condition.reset(reader.ReadNode());
203     statement.reset(reader.ReadNode());
204 }


Declaration at line 104 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::SwitchStatementNode::Statement()

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


Write Member Function

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

Definition at line 192 of Statement.cpp :
193 {
194     Node::Write(writer);
195     condition->Write(writer);
196     statement->Write(writer);
197 }


Declaration at line 103 of Statement.hpp

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

Calls: sngcpp::ast::Node::Write , sngcpp::ast::SwitchStatementNode::Write

Called by: sngcpp::ast::SwitchStatementNode::Write


top | up | prev | next