top | up | prev | next

NamespaceImportNode Class

Definition at line 69 of Namespace.hpp

Constructors

NamespaceImportNode(const Span& span_)
NamespaceImportNode(const Span& span_, IdentifierNode* ns_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
IdentifierNode* Ns() const
void Read(AstReader& reader) override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> ns

Constructor Details

NamespaceImportNode Constructor

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

Definition at line 157 of Namespace.cpp :
157 : Node(NodeType::namespaceImportNodespan_)ns()
158 {
159 }


Declaration at line 72 of Namespace.hpp


NamespaceImportNode Constructor

sngcm::ast::NamespaceImportNode::NamespaceImportNode(const Span& span_, IdentifierNode * ns_)

Definition at line 161 of Namespace.cpp :
161 : Node(NodeType::namespaceImportNodespan_)ns(ns_)
162 {
163     ns->SetParent(this);
164 }


Declaration at line 73 of Namespace.hpp


Member Function Details

Accept Member Function

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

Definition at line 171 of Namespace.cpp :
172 {
173     visitor.Visit(*this);
174 }


Declaration at line 75 of Namespace.hpp

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

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


Clone Member Function

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

Definition at line 166 of Namespace.cpp :
167 {
168     return new NamespaceImportNode(GetSpan()static_cast<IdentifierNode*>(ns->Clone(cloneContext)));
169 }


Declaration at line 74 of Namespace.hpp

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

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

Called by: sngcm::ast::NamespaceImportNode::Clone


Ns Member Function

IdentifierNode * sngcm::ast::NamespaceImportNode::Ns() const

Definition at line 189 of Namespace.cpp :
190 {
191     return ns.get();
192 }


Declaration at line 78 of Namespace.hpp

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


Read Member Function

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

Definition at line 182 of Namespace.cpp :
183 {
184     Node::Read(reader);
185     ns.reset(reader.ReadIdentifierNode());
186     ns->SetParent(this);
187 }


Declaration at line 77 of Namespace.hpp

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

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


Write Member Function

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

Definition at line 176 of Namespace.cpp :
177 {
178     Node::Write(writer);
179     writer.Write(ns.get());
180 }


Declaration at line 76 of Namespace.hpp

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

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


top | up | prev | next