top | up | prev | next

StructuredLiteralNode Class

Definition at line 311 of Literal.hpp

Constructors

StructuredLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Member Functions

void Accept(Visitor& visitor) override
void AddMember(Node* member)
Node* Clone(CloneContext& cloneContext) const override
const NodeList<Node>& Members() const
NodeList<Node>& Members()
void Read(AstReader& reader) override
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> members

Constructor Details

StructuredLiteralNode Constructor

sngcm::ast::StructuredLiteralNode::StructuredLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 813 of Literal.cpp :
813 :
814 LiteralNode(NodeType::structuredLiteralNodespan_moduleId_)
815 {
816 }


Declaration at line 314 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 829 of Literal.cpp :
830 {
831     visitor.Visit(*this);
832 }


Declaration at line 316 of Literal.hpp

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

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


AddMember Member Function

void sngcm::ast::StructuredLiteralNode::AddMember(Node * member)

Definition at line 846 of Literal.cpp :
847 {
848     member->SetParent(this);
849     members.Add(member);
850 }


Declaration at line 320 of Literal.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::StructuredLiteralNode::Clone


Clone Member Function

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

Definition at line 818 of Literal.cpp :
819 {
820     StructuredLiteralNode* clone = new StructuredLiteralNode(GetSpan()ModuleId());
821     int n = members.Count();
822     for (int i = 0; i < n; ++i)
823     {
824         clone->AddMember(members[i]->Clone(cloneContext));
825     }
826     return clone;
827 }


Declaration at line 315 of Literal.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Count , sngcm::ast::StructuredLiteralNode::AddMember , sngcm::ast::StructuredLiteralNode::Clone

Called by: sngcm::ast::StructuredLiteralNode::Clone


Members Member Function

const NodeList <Node >& sngcm::ast::StructuredLiteralNode::Members() const

Definition at line 321 of Literal.hpp :
321 { return members; }


Members Member Function

NodeList <Node >& sngcm::ast::StructuredLiteralNode::Members()

Definition at line 322 of Literal.hpp :
322 { return members; }

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


Read Member Function

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

Definition at line 840 of Literal.cpp :
841 {
842     LiteralNode::Read(reader);
843     members.Read(reader);
844 }


Declaration at line 318 of Literal.hpp

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

Calls: sngcm::ast::LiteralNode::Read , sngcm::ast::NodeList::Read


ToString Member Function

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

Definition at line 319 of Literal.hpp :
319 { return "structure"; }

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


Write Member Function

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

Definition at line 834 of Literal.cpp :
835 {
836     LiteralNode::Write(writer);
837     members.Write(writer);
838 }


Declaration at line 317 of Literal.hpp

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

Calls: sngcm::ast::LiteralNode::Write , sngcm::ast::NodeList::Write


top | up | prev | next