top | up | prev | next

DotNode Class

Definition at line 13 of Expression.hpp

Constructors

DotNode(const Span& span_)
DotNode(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

DotNode Constructor

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

Definition at line 12 of Expression.cpp :
  12 : UnaryNode(NodeType::dotNodespan_)memberId()
  13 {
  14 }


Declaration at line 16 of Expression.hpp


DotNode Constructor

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

Definition at line 16 of Expression.cpp :
  16 : UnaryNode(NodeType::dotNodespan_subject_)memberId(memberId_)
  17 {
  18     memberId->SetParent(this);
  19 }


Declaration at line 17 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 26 of Expression.cpp :
  27 {
  28     visitor.Visit(*this);
  29 }


Declaration at line 19 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 21 of Expression.cpp :
  22 {
  23     return new DotNode(GetSpan()Subject()->Clone(cloneContext)static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
  24 }


Declaration at line 18 of Expression.hpp

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

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

Called by: sngcm::ast::DotNode::Clone


MemberId Member Function

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

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


MemberId Member Function

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

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

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


Read Member Function

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

Definition at line 37 of Expression.cpp :
  38 {
  39     UnaryNode::Read(reader);
  40     memberId.reset(reader.ReadIdentifierNode());
  41     memberId->SetParent(this);
  42 }


Declaration at line 21 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::DotNode::ToString() const override

Definition at line 44 of Expression.cpp :
  45 {
  46     return Subject()->ToString() + "." + memberId->ToString();
  47 }


Declaration at line 22 of Expression.hpp

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

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

Called by: sngcm::ast::DotNode::ToString


Write Member Function

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

Definition at line 31 of Expression.cpp :
  32 {
  33     UnaryNode::Write(writer);
  34     writer.Write(memberId.get());
  35 }


Declaration at line 20 of Expression.hpp

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

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


top | up | prev | next