top | up | prev | next

ArrayLiteralNode Class

Definition at line 294 of Literal.hpp

Constructors

ArrayLiteralNode(const Span& span_)

Member Functions

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

Member Variables

NodeList<Node> values

Constructor Details

ArrayLiteralNode Constructor

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

Definition at line 725 of Literal.cpp :
725 : LiteralNode(NodeType::arrayLiteralNodespan_)
726 {
727 }


Declaration at line 297 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 740 of Literal.cpp :
741 {
742     visitor.Visit(*this);
743 }


Declaration at line 299 of Literal.hpp

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

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


AddValue Member Function

void sngcm::ast::ArrayLiteralNode::AddValue(Node * value)

Definition at line 757 of Literal.cpp :
758 {
759     value->SetParent(this);
760     values.Add(value);
761 }


Declaration at line 303 of Literal.hpp

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

Called by: sngcm::ast::ArrayLiteralNode::Clone


Clone Member Function

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

Definition at line 729 of Literal.cpp :
730 {
731     ArrayLiteralNode* clone = new ArrayLiteralNode(GetSpan());
732     int n = values.Count();
733     for (int i = 0; i < n; ++i)
734     {
735         clone->AddValue(values[i]->Clone(cloneContext));
736     }
737     return clone;
738 }


Declaration at line 298 of Literal.hpp

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

Calls: sngcm::ast::ArrayLiteralNode::AddValue , sngcm::ast::ArrayLiteralNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ArrayLiteralNode::Clone


Read Member Function

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

Definition at line 751 of Literal.cpp :
752 {
753     LiteralNode::Read(reader);
754     values.Read(reader);
755 }


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

Definition at line 302 of Literal.hpp :
302 { return "array"; }

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


Values Member Function

const NodeList <Node >& sngcm::ast::ArrayLiteralNode::Values() const

Definition at line 304 of Literal.hpp :
304 { return values; }


Values Member Function

NodeList <Node >& sngcm::ast::ArrayLiteralNode::Values()

Definition at line 305 of Literal.hpp :
305 { return values; }

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


Write Member Function

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

Definition at line 745 of Literal.cpp :
746 {
747     LiteralNode::Write(writer);
748     values.Write(writer);
749 }


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