top | up | prev | next

IndexingNode Class

Definition at line 363 of Expression.hpp

Constructors

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

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const Node* Index() const
Node* Index()
void Read(AstReader& reader) override
const Node* Subject() const
Node* Subject()
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> index
std::unique_ptr<Node> subject

Constructor Details

IndexingNode Constructor

sngcm::ast::IndexingNode::IndexingNode(const Span& span_)

Definition at line 812 of Expression.cpp :
 812 : Node(NodeType::indexingNodespan_)subject()index()
 813 {
 814 }


Declaration at line 366 of Expression.hpp


IndexingNode Constructor

sngcm::ast::IndexingNode::IndexingNode(const Span& span_, Node * subject_, Node * index_)

Definition at line 816 of Expression.cpp :
 816 : Node(NodeType::indexingNodespan_)subject(subject_)index(index_)
 817 {
 818     subject->SetParent(this);
 819     index->SetParent(this);
 820 }


Declaration at line 367 of Expression.hpp


Member Function Details

Accept Member Function

void sngcm::ast::IndexingNode::Accept(Visitor & visitor) override

Definition at line 827 of Expression.cpp :
 828 {
 829     visitor.Visit(*this);
 830 }


Declaration at line 369 of Expression.hpp

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

Calls: sngcm::ast::Visitor::Visit


Clone Member Function

Node * sngcm::ast::IndexingNode::Clone(CloneContext & cloneContext) const override

Definition at line 822 of Expression.cpp :
 823 {
 824     return new IndexingNode(GetSpan()subject->Clone(cloneContext)index->Clone(cloneContext));
 825 }


Declaration at line 368 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::IndexingNode::Clone , sngcm::ast::Node::GetSpan

Called by: sngcm::ast::IndexingNode::Clone


Index Member Function

const Node * sngcm::ast::IndexingNode::Index() const

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


Index Member Function

Node * sngcm::ast::IndexingNode::Index()

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

Called by: sngcm::ast::SourceWriter::Visit


Read Member Function

void sngcm::ast::IndexingNode::Read(AstReader & reader) override

Definition at line 839 of Expression.cpp :
 840 {
 841     Node::Read(reader);
 842     subject.reset(reader.ReadNode());
 843     subject->SetParent(this);
 844     index.reset(reader.ReadNode());
 845     index->SetParent(this);
 846 }


Declaration at line 371 of Expression.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent


Subject Member Function

const Node * sngcm::ast::IndexingNode::Subject() const

Definition at line 372 of Expression.hpp :
372 { return subject.get(); }


Subject Member Function

Node * sngcm::ast::IndexingNode::Subject()

Definition at line 373 of Expression.hpp :
373 { return subject.get(); }

Called by: sngcm::ast::SourceWriter::Visit


ToString Member Function

std::string sngcm::ast::IndexingNode::ToString() const override

Definition at line 848 of Expression.cpp :
 849 {
 850     return subject->ToString() + "[" + index->ToString() + "]";
 851 }


Declaration at line 376 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::ToString

Calls: sngcm::ast::IndexingNode::ToString

Called by: sngcm::ast::IndexingNode::ToString


Write Member Function

void sngcm::ast::IndexingNode::Write(AstWriter & writer) override

Definition at line 832 of Expression.cpp :
 833 {
 834     Node::Write(writer);
 835     writer.Write(subject.get());
 836     writer.Write(index.get());
 837 }


Declaration at line 370 of Expression.hpp

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

Calls: sngcm::ast::Node::Write


top | up | prev | next