top | up | prev | next

ConstructionStatementNode Class

Definition at line 250 of Statement.hpp

Constructors

ConstructionStatementNode(const Span& span_)
ConstructionStatementNode(const Span& span_, Node* typeExpr_, IdentifierNode* id_)

Member Functions

void Accept(Visitor& visitor) override
void AddArgument(Node* argument) override
const NodeList<Node>& Arguments() const
bool Assignment() const
Node* Clone(CloneContext& cloneContext) const override
bool Empty() const
const IdentifierNode* Id() const
IdentifierNode* Id()
void Read(AstReader& reader) override
void SetAssignment()
void SetEmpty()
const Node* TypeExpr() const
Node* TypeExpr()
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> arguments
bool assignment
bool empty
std::unique_ptr<IdentifierNode> id
std::unique_ptr<Node> typeExpr

Constructor Details

ConstructionStatementNode Constructor

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

Definition at line 484 of Statement.cpp :
 484 : StatementNode(NodeType::constructionStatementNodespan_)typeExpr()id()arguments()assignment(false)empty(false)
 485 {
 486 }


Declaration at line 253 of Statement.hpp


ConstructionStatementNode Constructor

sngcm::ast::ConstructionStatementNode::ConstructionStatementNode(const Span& span_, Node * typeExpr_, IdentifierNode * id_)

Definition at line 488 of Statement.cpp :
 488 :
 489 StatementNode(NodeType::constructionStatementNodespan_)typeExpr(typeExpr_)id(id_)arguments()assignment(false)empty(false)
 490 {
 491     typeExpr->SetParent(this);
 492     id->SetParent(this);
 493 }


Declaration at line 254 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 508 of Statement.cpp :
 509 {
 510     visitor.Visit(*this);
 511 }


Declaration at line 256 of Statement.hpp

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

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


AddArgument Member Function

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

Definition at line 536 of Statement.cpp :
 537 {
 538     argument->SetParent(this);
 539     arguments.Add(argument);
 540 }


Declaration at line 259 of Statement.hpp

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

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

Called by: sngcm::ast::ConstructionStatementNode::Clone


Arguments Member Function

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

Definition at line 264 of Statement.hpp :
264 { return arguments; }

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


Assignment Member Function

bool sngcm::ast::ConstructionStatementNode::Assignment() const

Definition at line 266 of Statement.hpp :
266 { return assignment; }

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


Clone Member Function

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

Definition at line 495 of Statement.cpp
Declaration at line 255 of Statement.hpp

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

Calls: sngcm::ast::ConstructionStatementNode::AddArgument , sngcm::ast::ConstructionStatementNode::Clone , sngcm::ast::ConstructionStatementNode::SetAssignment , sngcm::ast::ConstructionStatementNode::SetEmpty , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConstructionStatementNode::Clone


Empty Member Function

bool sngcm::ast::ConstructionStatementNode::Empty() const

Definition at line 268 of Statement.hpp :
268 { return empty; }

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


Id Member Function

const IdentifierNode * sngcm::ast::ConstructionStatementNode::Id() const

Definition at line 262 of Statement.hpp :
262 { return id.get(); }


Id Member Function

IdentifierNode * sngcm::ast::ConstructionStatementNode::Id()

Definition at line 263 of Statement.hpp :
263 { return id.get(); }

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


Read Member Function

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

Definition at line 523 of Statement.cpp
Declaration at line 258 of Statement.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , sngcm::ast::StatementNode::Read , soulng::util::BinaryReader::ReadBool


SetAssignment Member Function

void sngcm::ast::ConstructionStatementNode::SetAssignment()

Definition at line 265 of Statement.hpp :
265 { assignment = true; }

Called by: sngcm::ast::ConstructionStatementNode::Clone


SetEmpty Member Function

void sngcm::ast::ConstructionStatementNode::SetEmpty()

Definition at line 267 of Statement.hpp :
267 { empty = true; }

Called by: sngcm::ast::ConstructionStatementNode::Clone


TypeExpr Member Function

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

Definition at line 260 of Statement.hpp :
260 { return typeExpr.get(); }


TypeExpr Member Function

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

Definition at line 261 of Statement.hpp :
261 { return typeExpr.get(); }

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


Write Member Function

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

Definition at line 513 of Statement.cpp :
 514 {
 515     StatementNode::Write(writer);
 516     writer.Write(typeExpr.get());
 517     writer.Write(id.get());
 518     arguments.Write(writer);
 519     writer.GetBinaryWriter().Write(assignment);
 520     writer.GetBinaryWriter().Write(empty);
 521 }


Declaration at line 257 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::NodeList::Write , sngcm::ast::StatementNode::Write , soulng::util::BinaryWriter::Write


top | up | prev | next