top | up | prev | next

LabeledStatementNode Class

Definition at line 43 of Statement.hpp

Constructors

LabeledStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)
LabeledStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, StatementNode* stmt_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const LabelNode* Label() const
LabelNode* Label()
void Read(AstReader& reader) override
void SetLabelNode(LabelNode* labelNode_)
StatementNode* Stmt()
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<LabelNode> labelNode
std::unique_ptr<StatementNode> stmt

Constructor Details

LabeledStatementNode Constructor

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

Definition at line 57 of Statement.cpp :
  57 : StatementNode(NodeType::labeledStatementNodespan_moduleId_)
  58 {
  59 }


Declaration at line 46 of Statement.hpp


LabeledStatementNode Constructor

sngcm::ast::LabeledStatementNode::LabeledStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, StatementNode * stmt_)

Definition at line 61 of Statement.cpp :
  61 :
  62 StatementNode(NodeType::labeledStatementNodespan_moduleId_)stmt(stmt_)
  63 {
  64     stmt->SetParent(this);
  65 }


Declaration at line 47 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 74 of Statement.cpp :
  75 {
  76     visitor.Visit(*this);
  77 }


Declaration at line 49 of Statement.hpp

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

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


Clone Member Function

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

Definition at line 67 of Statement.cpp :
  68 {
  69     LabeledStatementNode* clone = new LabeledStatementNode(GetSpan()ModuleId()static_cast<StatementNode*>(stmt->Clone(cloneContext)));
  70     clone->SetLabelNode(static_cast<LabelNode*>(labelNode->Clone(cloneContext)));
  71     return clone;
  72 }


Declaration at line 48 of Statement.hpp

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

Calls: sngcm::ast::LabeledStatementNode::Clone , sngcm::ast::LabeledStatementNode::SetLabelNode , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId

Called by: sngcm::ast::LabeledStatementNode::Clone


Label Member Function

const LabelNode * sngcm::ast::LabeledStatementNode::Label() const

Definition at line 52 of Statement.hpp :
 52 { return labelNode.get(); }


Label Member Function

LabelNode * sngcm::ast::LabeledStatementNode::Label()

Definition at line 53 of Statement.hpp :
 53 { return labelNode.get(); }

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


Read Member Function

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

Definition at line 86 of Statement.cpp :
  87 {
  88     StatementNode::Read(reader);
  89     labelNode.reset(reader.ReadLabelNode());
  90     labelNode->SetParent(this);
  91     stmt.reset(reader.ReadStatementNode());
  92     stmt->SetParent(this);
  93 }


Declaration at line 51 of Statement.hpp

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

Calls: sngcm::ast::AstReader::ReadLabelNode , sngcm::ast::AstReader::ReadStatementNode , sngcm::ast::Node::SetParent , sngcm::ast::StatementNode::Read


SetLabelNode Member Function

void sngcm::ast::LabeledStatementNode::SetLabelNode(LabelNode * labelNode_)

Definition at line 95 of Statement.cpp :
  96 {
  97     labelNode.reset(labelNode_);
  98     labelNode->SetParent(this);
  99 }


Declaration at line 54 of Statement.hpp

Calls: sngcm::ast::Node::SetParent

Called by: sngcm::ast::LabeledStatementNode::Clone


Stmt Member Function

StatementNode * sngcm::ast::LabeledStatementNode::Stmt()

Definition at line 55 of Statement.hpp :
 55 { return stmt.get(); }

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


Write Member Function

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

Definition at line 79 of Statement.cpp :
  80 {
  81     StatementNode::Write(writer);
  82     writer.Write(labelNode.get());
  83     writer.Write(stmt.get());
  84 }


Declaration at line 50 of Statement.hpp

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

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


top | up | prev | next