top | up | prev | next

AssignmentStatementNode Class

Definition at line 307 of Statement.hpp

Constructors

AssignmentStatementNode(const Span& span_)
AssignmentStatementNode(const Span& span_, Node* targetExpr_, Node* sourceExpr_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
const Node* SourceExpr() const
Node* SourceExpr()
const Node* TargetExpr() const
Node* TargetExpr()
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> sourceExpr
std::unique_ptr<Node> targetExpr

Constructor Details

AssignmentStatementNode Constructor

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

Definition at line 608 of Statement.cpp :
 608 : StatementNode(NodeType::assignmentStatementNodespan_)targetExpr()sourceExpr()
 609 {
 610 }


Declaration at line 310 of Statement.hpp


AssignmentStatementNode Constructor

sngcm::ast::AssignmentStatementNode::AssignmentStatementNode(const Span& span_, Node * targetExpr_, Node * sourceExpr_)

Definition at line 612 of Statement.cpp :
 612 :
 613 StatementNode(NodeType::assignmentStatementNodespan_)targetExpr(targetExpr_)sourceExpr(sourceExpr_)
 614 {
 615     targetExpr->SetParent(this);
 616     sourceExpr->SetParent(this);
 617 }


Declaration at line 311 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 625 of Statement.cpp :
 626 {
 627     visitor.Visit(*this);
 628 }


Declaration at line 313 of Statement.hpp

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

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


Clone Member Function

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

Definition at line 619 of Statement.cpp :
 620 {
 621     AssignmentStatementNode* clone = new AssignmentStatementNode(GetSpan()targetExpr->Clone(cloneContext)sourceExpr->Clone(cloneContext));
 622     return clone;
 623 }


Declaration at line 312 of Statement.hpp

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

Calls: sngcm::ast::AssignmentStatementNode::Clone , sngcm::ast::Node::GetSpan

Called by: sngcm::ast::AssignmentStatementNode::Clone


Read Member Function

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

Definition at line 637 of Statement.cpp :
 638 {
 639     StatementNode::Read(reader);
 640     targetExpr.reset(reader.ReadNode());
 641     targetExpr->SetParent(this);
 642     sourceExpr.reset(reader.ReadNode());
 643     sourceExpr->SetParent(this);
 644 }


Declaration at line 315 of Statement.hpp

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

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


SourceExpr Member Function

const Node * sngcm::ast::AssignmentStatementNode::SourceExpr() const

Definition at line 318 of Statement.hpp :
318 { return sourceExpr.get(); }


SourceExpr Member Function

Node * sngcm::ast::AssignmentStatementNode::SourceExpr()

Definition at line 319 of Statement.hpp :
319 { return sourceExpr.get(); }

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


TargetExpr Member Function

const Node * sngcm::ast::AssignmentStatementNode::TargetExpr() const

Definition at line 316 of Statement.hpp :
316 { return targetExpr.get(); }


TargetExpr Member Function

Node * sngcm::ast::AssignmentStatementNode::TargetExpr()

Definition at line 317 of Statement.hpp :
317 { return targetExpr.get(); }

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


Write Member Function

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

Definition at line 630 of Statement.cpp :
 631 {
 632     StatementNode::Write(writer);
 633     writer.Write(targetExpr.get());
 634     writer.Write(sourceExpr.get());
 635 }


Declaration at line 314 of Statement.hpp

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

Calls: sngcm::ast::StatementNode::Write


top | up | prev | next