top | up | prev | next

ConditionalExpressionNode Class

Definition at line 54 of Expression.hpp

Constructors

ConditionalExpressionNode()
ConditionalExpressionNode(const Span& span_, Node* condition_, Node* thenExpr_, Node* elseExpr_)

Member Functions

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

Member Variables

std::unique_ptr<Node> condition
std::unique_ptr<Node> elseExpr
std::unique_ptr<Node> thenExpr

Constructor Details

ConditionalExpressionNode Constructor

sngcpp::ast::ConditionalExpressionNode::ConditionalExpressionNode()

Definition at line 125 of Expression.cpp :
 125 : Node(NodeType::conditionalExpressionNode)
 126 {
 127 }


Declaration at line 57 of Expression.hpp


ConditionalExpressionNode Constructor

sngcpp::ast::ConditionalExpressionNode::ConditionalExpressionNode(const Span& span_, Node * condition_, Node * thenExpr_, Node * elseExpr_)

Definition at line 129 of Expression.cpp :
 129 :
 130 Node(NodeType::conditionalExpressionNodespan_)condition(condition_)thenExpr(thenExpr_)elseExpr(elseExpr_)
 131 {
 132 }


Declaration at line 58 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 134 of Expression.cpp :
 135 {
 136     visitor.Visit(*this);
 137 }


Declaration at line 59 of Expression.hpp

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

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


Condition Member Function

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

Definition at line 62 of Expression.hpp :
 62 { return condition.get(); }


ElseExpr Member Function

Node * sngcpp::ast::ConditionalExpressionNode::ElseExpr()

Definition at line 64 of Expression.hpp :
 64 { return elseExpr.get(); }


Read Member Function

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

Definition at line 147 of Expression.cpp :
 148 {
 149     Node::Read(reader);
 150     condition.reset(reader.ReadNode());
 151     thenExpr.reset(reader.ReadNode());
 152     elseExpr.reset(reader.ReadNode());
 153 }


Declaration at line 61 of Expression.hpp

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

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


ThenExpr Member Function

Node * sngcpp::ast::ConditionalExpressionNode::ThenExpr()

Definition at line 63 of Expression.hpp :
 63 { return thenExpr.get(); }


Write Member Function

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

Definition at line 139 of Expression.cpp :
 140 {
 141     Node::Write(writer);
 142     condition->Write(writer);
 143     thenExpr->Write(writer);
 144     elseExpr->Write(writer);
 145 }


Declaration at line 60 of Expression.hpp

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

Calls: sngcpp::ast::ConditionalExpressionNode::Write , sngcpp::ast::Node::Write

Called by: sngcpp::ast::ConditionalExpressionNode::Write


top | up | prev | next