top | up | prev | next

ArrayLiteralNode Class

Definition at line 295 of Literal.hpp

Constructors

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

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_, const boost::uuids::uuid& moduleId_)

Definition at line 774 of Literal.cpp :
774 :
775 LiteralNode(NodeType::arrayLiteralNodespan_moduleId_)
776 {
777 }


Declaration at line 298 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 790 of Literal.cpp :
791 {
792     visitor.Visit(*this);
793 }


Declaration at line 300 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 807 of Literal.cpp :
808 {
809     value->SetParent(this);
810     values.Add(value);
811 }


Declaration at line 304 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 779 of Literal.cpp :
780 {
781     ArrayLiteralNode* clone = new ArrayLiteralNode(GetSpan()ModuleId());
782     int n = values.Count();
783     for (int i = 0; i < n; ++i)
784     {
785         clone->AddValue(values[i]->Clone(cloneContext));
786     }
787     return clone;
788 }


Declaration at line 299 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::Node::ModuleId , sngcm::ast::NodeList::Count

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


Read Member Function

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

Definition at line 801 of Literal.cpp :
802 {
803     LiteralNode::Read(reader);
804     values.Read(reader);
805 }


Declaration at line 302 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 303 of Literal.hpp :
303 { return "array"; }

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


Values Member Function

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

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


Values Member Function

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

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

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


Write Member Function

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

Definition at line 795 of Literal.cpp :
796 {
797     LiteralNode::Write(writer);
798     values.Write(writer);
799 }


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