top | up | prev | next

StructuredLiteralNode Class

Definition at line 310 of Literal.hpp

Constructors

StructuredLiteralNode(const Span& span_)

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_)

Definition at line 763 of Literal.cpp :
763 : LiteralNode(NodeType::structuredLiteralNodespan_)
764 {
765 }


Declaration at line 313 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 778 of Literal.cpp :
779 {
780     visitor.Visit(*this);
781 }


Declaration at line 315 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 795 of Literal.cpp :
796 {
797     member->SetParent(this);
798     members.Add(member);
799 }


Declaration at line 319 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 767 of Literal.cpp :
768 {
769     StructuredLiteralNode* clone = new StructuredLiteralNode(GetSpan());
770     int n = members.Count();
771     for (int i = 0; i < n; ++i)
772     {
773         clone->AddMember(members[i]->Clone(cloneContext));
774     }
775     return clone;
776 }


Declaration at line 314 of Literal.hpp

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

Calls: sngcm::ast::Node::GetSpan , 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 320 of Literal.hpp :
320 { return members; }


Members Member Function

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

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

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


Read Member Function

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

Definition at line 789 of Literal.cpp :
790 {
791     LiteralNode::Read(reader);
792     members.Read(reader);
793 }


Declaration at line 317 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 318 of Literal.hpp :
318 { return "structure"; }

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


Write Member Function

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

Definition at line 783 of Literal.cpp :
784 {
785     LiteralNode::Write(writer);
786     members.Write(writer);
787 }


Declaration at line 316 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