top | up | prev | next

ConstructNode Class

Definition at line 491 of Expression.hpp

Constructors

ConstructNode(const Span& span_)
ConstructNode(const Span& span_, Node* typeExpr_)

Member Functions

void Accept(Visitor& visitor) override
void AddArgument(Node* argument) override
const NodeList<Node>& Arguments() const
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
std::string ToString() const override
const Node* TypeExpr() const
Node* TypeExpr()
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> arguments
std::unique_ptr<Node> typeExpr

Constructor Details

ConstructNode Constructor

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

Definition at line 1123 of Expression.cpp :
1123 : Node(NodeType::constructNodespan_)typeExpr()arguments()
1124 {
1125 }


Declaration at line 494 of Expression.hpp


ConstructNode Constructor

sngcm::ast::ConstructNode::ConstructNode(const Span& span_, Node * typeExpr_)

Definition at line 1127 of Expression.cpp :
1127 : Node(NodeType::constructNodespan_)typeExpr(typeExpr_)arguments()
1128 {
1129     typeExpr->SetParent(this);
1130 }


Declaration at line 495 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 1144 of Expression.cpp :
1145 {
1146     visitor.Visit(*this);
1147 }


Declaration at line 497 of Expression.hpp

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

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


AddArgument Member Function

void sngcm::ast::ConstructNode::AddArgument(Node * argument) override

Definition at line 1165 of Expression.cpp :
1166 {
1167     argument->SetParent(this);
1168     arguments.Add(argument);
1169 }


Declaration at line 500 of Expression.hpp

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

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

Called by: sngcm::ast::ConstructNode::Clone


Arguments Member Function

const NodeList <Node >& sngcm::ast::ConstructNode::Arguments() const

Definition at line 503 of Expression.hpp :
503 { return arguments; }

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


Clone Member Function

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

Definition at line 1132 of Expression.cpp :
1133 {
1134     ConstructNode* clone = new ConstructNode(GetSpan()typeExpr->Clone(cloneContext));
1135     int n = arguments.Count();
1136     for (int i = 0; i < n; ++i)
1137     {
1138         Node* argument = arguments[i];
1139         clone->AddArgument(argument->Clone(cloneContext));
1140     }
1141     return clone;
1142 }


Declaration at line 496 of Expression.hpp

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

Calls: sngcm::ast::ConstructNode::AddArgument , sngcm::ast::ConstructNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConstructNode::Clone


Read Member Function

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

Definition at line 1156 of Expression.cpp :
1157 {
1158     Node::Read(reader);
1159     typeExpr.reset(reader.ReadNode());
1160     typeExpr->SetParent(this);
1161     arguments.Read(reader);
1162     arguments.SetParent(this);
1163 }


Declaration at line 499 of Expression.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent


ToString Member Function

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

Definition at line 1171 of Expression.cpp
Declaration at line 504 of Expression.hpp

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

Calls: sngcm::ast::ConstructNode::ToString , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConstructNode::ToString


TypeExpr Member Function

const Node * sngcm::ast::ConstructNode::TypeExpr() const

Definition at line 501 of Expression.hpp :
501 { return typeExpr.get(); }


TypeExpr Member Function

Node * sngcm::ast::ConstructNode::TypeExpr()

Definition at line 502 of Expression.hpp :
502 { return typeExpr.get(); }

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


Write Member Function

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

Definition at line 1149 of Expression.cpp :
1150 {
1151     Node::Write(writer);
1152     writer.Write(typeExpr.get());
1153     arguments.Write(writer);
1154 }


Declaration at line 498 of Expression.hpp

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

Calls: sngcm::ast::Node::Write , sngcm::ast::NodeList::Write


top | up | prev | next