top | up | prev | next

ArrowNode Class

Definition at line 29 of Expression.hpp

Constructors

ArrowNode(const Span& span_)
ArrowNode(const Span& span_, Node* subject_, IdentifierNode* memberId_)

Member Functions

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

Member Variables

std::unique_ptr<IdentifierNode> memberId

Constructor Details

ArrowNode Constructor

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

Definition at line 49 of Expression.cpp :
  49 : UnaryNode(NodeType::arrowNodespan_)memberId()
  50 {
  51 }


Declaration at line 32 of Expression.hpp


ArrowNode Constructor

sngcm::ast::ArrowNode::ArrowNode(const Span& span_, Node * subject_, IdentifierNode * memberId_)

Definition at line 53 of Expression.cpp :
  53 : UnaryNode(NodeType::arrowNodespan_subject_)memberId(memberId_)
  54 {
  55     memberId->SetParent(this);
  56 }


Declaration at line 33 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 63 of Expression.cpp :
  64 {
  65     visitor.Visit(*this);
  66 }


Declaration at line 35 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 58 of Expression.cpp :
  59 {
  60     return new ArrowNode(GetSpan()Subject()->Clone(cloneContext)static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
  61 }


Declaration at line 34 of Expression.hpp

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

Calls: sngcm::ast::ArrowNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::UnaryNode::Subject

Called by: sngcm::ast::ArrowNode::Clone


MemberId Member Function

const IdentifierNode * sngcm::ast::ArrowNode::MemberId() const

Definition at line 39 of Expression.hpp :
 39 { return memberId.get(); }


MemberId Member Function

IdentifierNode * sngcm::ast::ArrowNode::MemberId()

Definition at line 40 of Expression.hpp :
 40 { return memberId.get(); }

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


Read Member Function

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

Definition at line 74 of Expression.cpp :
  75 {
  76     UnaryNode::Read(reader);
  77     memberId.reset(reader.ReadIdentifierNode());
  78     memberId->SetParent(this);
  79 }


Declaration at line 37 of Expression.hpp

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

Calls: sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::Node::SetParent , sngcm::ast::UnaryNode::Read


ToString Member Function

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

Definition at line 81 of Expression.cpp :
  82 {
  83     return Subject()->ToString() + "->" + memberId->ToString();
  84 }


Declaration at line 38 of Expression.hpp

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

Calls: sngcm::ast::ArrowNode::ToString , sngcm::ast::Node::ToString , sngcm::ast::UnaryNode::Subject

Called by: sngcm::ast::ArrowNode::ToString


Write Member Function

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

Definition at line 68 of Expression.cpp :
  69 {
  70     UnaryNode::Write(writer);
  71     writer.Write(memberId.get());
  72 }


Declaration at line 36 of Expression.hpp

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

Calls: sngcm::ast::UnaryNode::Write


top | up | prev | next