top | up | prev | next

SwitchStatementNode Class

Definition at line 386 of Statement.hpp

Constructors

SwitchStatementNode(const Span& span_)
SwitchStatementNode(const Span& span_, Node* condition_)

Member Functions

void Accept(Visitor& visitor) override
void AddCase(CaseStatementNode* caseS)
const Span& BeginBraceSpan() const
const NodeList<CaseStatementNode>& Cases() const
Node* Clone(CloneContext& cloneContext) const override
const Node* Condition() const
Node* Condition()
const DefaultStatementNode* Default() const
DefaultStatementNode* Default()
const Span& EndBraceSpan() const
bool IsBreakEnclosingStatementNode() const override
const Span& LeftParenSpan() const
void Read(AstReader& reader) override
const Span& RightParenSpan() const
void SetBeginBraceSpan(const Span& beginBraceSpan_)
void SetDefault(DefaultStatementNode* defaultS_)
void SetEndBraceSpan(const Span& endBraceSpan_)
void SetLeftParenSpan(const Span& leftParenSpan_)
void SetRightParenSpan(const Span& rightParenSpan_)
void Write(AstWriter& writer) override

Member Variables

Span beginBraceSpan
NodeList<CaseStatementNode> cases
std::unique_ptr<Node> condition
std::unique_ptr<DefaultStatementNode> defaultS
Span endBraceSpan
Span leftParenSpan
Span rightParenSpan

Constructor Details

SwitchStatementNode Constructor

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

Definition at line 750 of Statement.cpp :
 750 : StatementNode(NodeType::switchStatementNodespan_)condition()cases()defaultS()
 751 {
 752 }


Declaration at line 389 of Statement.hpp


SwitchStatementNode Constructor

sngcm::ast::SwitchStatementNode::SwitchStatementNode(const Span& span_, Node * condition_)

Definition at line 754 of Statement.cpp :
 754 : StatementNode(NodeType::switchStatementNodespan_)condition(condition_)cases()defaultS()
 755 {
 756     condition->SetParent(this);
 757 }


Declaration at line 390 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 778 of Statement.cpp :
 779 {
 780     visitor.Visit(*this);
 781 }


Declaration at line 392 of Statement.hpp

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

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


AddCase Member Function

void sngcm::ast::SwitchStatementNode::AddCase(CaseStatementNode * caseS)

Definition at line 819 of Statement.cpp :
 820 {
 821     caseS->SetParent(this);
 822     cases.Add(caseS);
 823 }


Declaration at line 398 of Statement.hpp

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

Called by: sngcm::ast::SwitchStatementNode::Clone


BeginBraceSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::BeginBraceSpan() const

Definition at line 408 of Statement.hpp :
408 { return beginBraceSpan; }


Cases Member Function

const NodeList <CaseStatementNode >& sngcm::ast::SwitchStatementNode::Cases() const

Definition at line 399 of Statement.hpp :
399 { return cases; }

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


Clone Member Function

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

Definition at line 759 of Statement.cpp
Declaration at line 391 of Statement.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count , sngcm::ast::SwitchStatementNode::AddCase , sngcm::ast::SwitchStatementNode::Clone , sngcm::ast::SwitchStatementNode::SetBeginBraceSpan , sngcm::ast::SwitchStatementNode::SetDefault , sngcm::ast::SwitchStatementNode::SetEndBraceSpan , sngcm::ast::SwitchStatementNode::SetLeftParenSpan , sngcm::ast::SwitchStatementNode::SetRightParenSpan

Called by: sngcm::ast::SwitchStatementNode::Clone


Condition Member Function

const Node * sngcm::ast::SwitchStatementNode::Condition() const

Definition at line 396 of Statement.hpp :
396 { return condition.get(); }


Condition Member Function

Node * sngcm::ast::SwitchStatementNode::Condition()

Definition at line 397 of Statement.hpp :
397 { return condition.get(); }

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


Default Member Function

const DefaultStatementNode * sngcm::ast::SwitchStatementNode::Default() const

Definition at line 401 of Statement.hpp :
401 { return defaultS.get(); }


Default Member Function

DefaultStatementNode * sngcm::ast::SwitchStatementNode::Default()

Definition at line 402 of Statement.hpp :
402 { return defaultS.get(); }

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


EndBraceSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::EndBraceSpan() const

Definition at line 410 of Statement.hpp :
410 { return endBraceSpan; }


IsBreakEnclosingStatementNode Member Function

bool sngcm::ast::SwitchStatementNode::IsBreakEnclosingStatementNode() const override

Definition at line 395 of Statement.hpp :
395 { return true; }

Base class overridden functions: sngcm::ast::StatementNode::IsBreakEnclosingStatementNode


LeftParenSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::LeftParenSpan() const

Definition at line 404 of Statement.hpp :
404 { return leftParenSpan; }


Read Member Function

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

Definition at line 800 of Statement.cpp
Declaration at line 394 of Statement.hpp

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

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


RightParenSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::RightParenSpan() const

Definition at line 406 of Statement.hpp :
406 { return rightParenSpan; }


SetBeginBraceSpan Member Function

void sngcm::ast::SwitchStatementNode::SetBeginBraceSpan(const Span& beginBraceSpan_)

Definition at line 407 of Statement.hpp :
407 { beginBraceSpan = beginBraceSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetDefault Member Function

void sngcm::ast::SwitchStatementNode::SetDefault(DefaultStatementNode * defaultS_)

Definition at line 825 of Statement.cpp :
 826 {
 827     defaultS.reset(defaultS_);
 828     defaultS->SetParent(this);
 829 }


Declaration at line 400 of Statement.hpp

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

Called by: sngcm::ast::SwitchStatementNode::Clone


SetEndBraceSpan Member Function

void sngcm::ast::SwitchStatementNode::SetEndBraceSpan(const Span& endBraceSpan_)

Definition at line 409 of Statement.hpp :
409 { endBraceSpan = endBraceSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetLeftParenSpan Member Function

void sngcm::ast::SwitchStatementNode::SetLeftParenSpan(const Span& leftParenSpan_)

Definition at line 403 of Statement.hpp :
403 { leftParenSpan = leftParenSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetRightParenSpan Member Function

void sngcm::ast::SwitchStatementNode::SetRightParenSpan(const Span& rightParenSpan_)

Definition at line 405 of Statement.hpp :
405 { rightParenSpan = rightParenSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


Write Member Function

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

Definition at line 783 of Statement.cpp
Declaration at line 393 of Statement.hpp

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

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


top | up | prev | next