top | up | prev | next

SubscriptExpressionNode Class

Definition at line 255 of Expression.hpp

Constructors

SubscriptExpressionNode()
SubscriptExpressionNode(const Span& span_, Node* subject_, Node* index_)

Member Functions

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

Member Variables

std::unique_ptr<Node> index

Constructor Details

SubscriptExpressionNode Constructor

sngcpp::ast::SubscriptExpressionNode::SubscriptExpressionNode()

Definition at line 506 of Expression.cpp :
 506 : UnaryNode(NodeType::subscriptExpressionNode)
 507 {
 508 }


Declaration at line 258 of Expression.hpp


SubscriptExpressionNode Constructor

sngcpp::ast::SubscriptExpressionNode::SubscriptExpressionNode(const Span& span_, Node * subject_, Node * index_)

Definition at line 510 of Expression.cpp :
 510 : UnaryNode(NodeType::subscriptExpressionNodespan_subject_)index(index_)
 511 {
 512 }


Declaration at line 259 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 514 of Expression.cpp :
 515 {
 516     visitor.Visit(*this);
 517 }


Declaration at line 260 of Expression.hpp

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

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


Index Member Function

Node * sngcpp::ast::SubscriptExpressionNode::Index()

Definition at line 263 of Expression.hpp :
263 { return index.get(); }


Read Member Function

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

Definition at line 525 of Expression.cpp :
 526 {
 527     UnaryNode::Read(reader);
 528     index.reset(reader.ReadNode());
 529 }


Declaration at line 262 of Expression.hpp

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

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


Write Member Function

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

Definition at line 519 of Expression.cpp :
 520 {
 521     UnaryNode::Write(writer);
 522     index->Write(writer);
 523 }


Declaration at line 261 of Expression.hpp

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

Calls: sngcpp::ast::SubscriptExpressionNode::Write , sngcpp::ast::UnaryNode::Write

Called by: sngcpp::ast::SubscriptExpressionNode::Write


top | up | prev | next