top | up | prev | next

LValueRefNode Class

Definition at line 28 of TypeExpr.hpp

Constructors

LValueRefNode(const Span& span_)
LValueRefNode(const Span& span_, Node* subject_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
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> subject

Constructor Details

LValueRefNode Constructor

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

Definition at line 50 of TypeExpr.cpp :
 50 : Node(NodeType::lvalueRefNodespan_)
 51 {
 52 }


Declaration at line 31 of TypeExpr.hpp


LValueRefNode Constructor

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

Definition at line 54 of TypeExpr.cpp :
 54 : Node(NodeType::lvalueRefNodespan_)subject(subject_)
 55 {
 56     subject->SetParent(this);
 57 }


Declaration at line 32 of TypeExpr.hpp


Member Function Details

Accept Member Function

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

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


Declaration at line 34 of TypeExpr.hpp

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

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


Clone Member Function

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

Definition at line 59 of TypeExpr.cpp :
 60 {
 61     return new LValueRefNode(GetSpan()subject->Clone(cloneContext));
 62 }


Declaration at line 33 of TypeExpr.hpp

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

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

Called by: sngcm::ast::LValueRefNode::Clone


Read Member Function

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

Definition at line 75 of TypeExpr.cpp :
 76 {
 77     Node::Read(reader);
 78     subject.reset(reader.ReadNode());
 79     subject->SetParent(this);
 80 }


Declaration at line 36 of TypeExpr.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::LValueRefNode::Subject() const

Definition at line 38 of TypeExpr.hpp :
38 { return subject.get(); }


Subject Member Function

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

Definition at line 39 of TypeExpr.hpp :
39 { return subject.get(); }

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


ToString Member Function

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

Definition at line 82 of TypeExpr.cpp :
 83 {
 84     return subject->ToString() + "&";
 85 }


Declaration at line 37 of TypeExpr.hpp

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

Calls: sngcm::ast::LValueRefNode::ToString

Called by: sngcm::ast::LValueRefNode::ToString


Write Member Function

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

Definition at line 69 of TypeExpr.cpp :
 70 {
 71     Node::Write(writer);
 72     writer.Write(subject.get());
 73 }


Declaration at line 35 of TypeExpr.hpp

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

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


top | up | prev | next