top | up | prev | next

NewNode Class

Definition at line 510 of Expression.hpp

Constructors

NewNode(const Span& span_, const boost::uuids::uuid& moduleId_)
NewNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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

NewNode Constructor

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

Definition at line 1251 of Expression.cpp :
1251 : Node(NodeType::newNodespan_moduleId_)typeExpr()arguments()
1252 {
1253 }


Declaration at line 513 of Expression.hpp


NewNode Constructor

sngcm::ast::NewNode::NewNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * typeExpr_)

Definition at line 1255 of Expression.cpp :
1255 :
1256 Node(NodeType::newNodespan_moduleId_)typeExpr(typeExpr_)arguments()
1257 {
1258     typeExpr->SetParent(this);
1259 }


Declaration at line 514 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 1273 of Expression.cpp :
1274 {
1275     visitor.Visit(*this);
1276 }


Declaration at line 516 of Expression.hpp

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

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


AddArgument Member Function

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

Definition at line 1294 of Expression.cpp :
1295 {
1296     argument->SetParent(this);
1297     arguments.Add(argument);
1298 }


Declaration at line 519 of Expression.hpp

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

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

Called by: sngcm::ast::NewNode::Clone


Arguments Member Function

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

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

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


Clone Member Function

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

Definition at line 1261 of Expression.cpp :
1262 {
1263     NewNode* clone = new NewNode(GetSpan()ModuleId()typeExpr->Clone(cloneContext));
1264     int n = arguments.Count();
1265     for (int i = 0; i < n; ++i)
1266     {
1267         Node* argument = arguments[i];
1268         clone->AddArgument(argument->Clone(cloneContext));
1269     }
1270     return clone;
1271 }


Declaration at line 515 of Expression.hpp

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

Calls: sngcm::ast::NewNode::AddArgument , sngcm::ast::NewNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Count

Called by: sngcm::ast::NewNode::Clone


Read Member Function

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

Definition at line 1285 of Expression.cpp :
1286 {
1287     Node::Read(reader);
1288     typeExpr.reset(reader.ReadNode());
1289     typeExpr->SetParent(this);
1290     arguments.Read(reader);
1291     arguments.SetParent(this);
1292 }


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

Definition at line 1300 of Expression.cpp
Declaration at line 523 of Expression.hpp

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

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

Called by: sngcm::ast::NewNode::ToString


TypeExpr Member Function

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

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


TypeExpr Member Function

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

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

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


Write Member Function

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

Definition at line 1278 of Expression.cpp :
1279 {
1280     Node::Write(writer);
1281     writer.Write(typeExpr.get());
1282     arguments.Write(writer);
1283 }


Declaration at line 517 of Expression.hpp

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

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


top | up | prev | next