top | up | prev | next

CaseStatementNode Class

Definition at line 421 of Statement.hpp

Constructors

CaseStatementNode(const Span& span_)

Member Functions

void Accept(Visitor& visitor) override
void AddCaseExpr(Node* caseExpr)
void AddCaseSpan(const Span& caseSpan)
void AddStatement(StatementNode* statement)
const NodeList<Node>& CaseExprs() const
const std::vector<Span>& CaseSpans() const
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
const NodeList<StatementNode>& Statements() const
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> caseExprs
std::vector<Span> caseSpans
NodeList<StatementNode> statements

Constructor Details

CaseStatementNode Constructor

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

Definition at line 831 of Statement.cpp :
 831 : StatementNode(NodeType::caseStatementNodespan_)caseExprs()statements()
 832 {
 833 }


Declaration at line 424 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 852 of Statement.cpp :
 853 {
 854     visitor.Visit(*this);
 855 }


Declaration at line 426 of Statement.hpp

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

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


AddCaseExpr Member Function

void sngcm::ast::CaseStatementNode::AddCaseExpr(Node * caseExpr)

Definition at line 884 of Statement.cpp :
 885 {
 886     caseExpr->SetParent(this);
 887     caseExprs.Add(caseExpr);
 888 }


Declaration at line 429 of Statement.hpp

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

Called by: sngcm::ast::CaseStatementNode::Clone


AddCaseSpan Member Function

void sngcm::ast::CaseStatementNode::AddCaseSpan(const Span& caseSpan)

Definition at line 890 of Statement.cpp :
 891 {
 892     caseSpans.push_back(caseSpan);
 893 }


Declaration at line 433 of Statement.hpp


AddStatement Member Function

void sngcm::ast::CaseStatementNode::AddStatement(StatementNode * statement)

Definition at line 895 of Statement.cpp :
 896 {
 897     statement->SetParent(this);
 898     statements.Add(statement);
 899 }


Declaration at line 431 of Statement.hpp

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

Called by: sngcm::ast::CaseStatementNode::Clone


CaseExprs Member Function

const NodeList <Node >& sngcm::ast::CaseStatementNode::CaseExprs() const

Definition at line 430 of Statement.hpp :
430 { return caseExprs; }

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


CaseSpans Member Function

const std::vector<Span>& sngcm::ast::CaseStatementNode::CaseSpans() const

Definition at line 434 of Statement.hpp :
434 { return caseSpans; }


Clone Member Function

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

Definition at line 835 of Statement.cpp
Declaration at line 425 of Statement.hpp

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

Calls: sngcm::ast::CaseStatementNode::AddCaseExpr , sngcm::ast::CaseStatementNode::AddStatement , sngcm::ast::CaseStatementNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::CaseStatementNode::Clone


Read Member Function

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

Definition at line 870 of Statement.cpp
Declaration at line 428 of Statement.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadSpan , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , sngcm::ast::StatementNode::Read , soulng::util::BinaryReader::ReadULEB128UInt


Statements Member Function

const NodeList <StatementNode >& sngcm::ast::CaseStatementNode::Statements() const

Definition at line 432 of Statement.hpp :
432 { return statements; }

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


Write Member Function

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

Definition at line 857 of Statement.cpp
Declaration at line 427 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::WriteULEB128UInt


top | up | prev | next