top | up | prev | next

CatchNode Class

Definition at line 519 of Statement.hpp

Constructors

CatchNode(const Span& span_)
CatchNode(const Span& span_, Node* typeExpr_, IdentifierNode* id_, CompoundStatementNode* catchBlock_)

Member Functions

void Accept(Visitor& visitor) override
const CompoundStatementNode* CatchBlock() const
CompoundStatementNode* CatchBlock()
Node* Clone(CloneContext& cloneContext) const override
const IdentifierNode* Id() const
IdentifierNode* Id()
const Span& LeftParenSpan() const
void Read(AstReader& reader) override
const Span& RightParenSpan() const
void SetLeftParenSpan(const Span& leftParenSpan_)
void SetRightParenSpan(const Span& rightParenSpan_)
const Node* TypeExpr() const
Node* TypeExpr()
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<CompoundStatementNode> catchBlock
std::unique_ptr<IdentifierNode> id
Span leftParenSpan
Span rightParenSpan
std::unique_ptr<Node> typeExpr

Constructor Details

CatchNode Constructor

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

Definition at line 1037 of Statement.cpp :
1037 : Node(NodeType::catchNodespan_)typeExpr()id()catchBlock()
1038 {
1039 }


Declaration at line 522 of Statement.hpp


CatchNode Constructor

sngcm::ast::CatchNode::CatchNode(const Span& span_, Node * typeExpr_, IdentifierNode * id_, CompoundStatementNode * catchBlock_)

Definition at line 1041 of Statement.cpp :
1041 :
1042 Node(NodeType::catchNodespan_)typeExpr(typeExpr_)id(id_)catchBlock(catchBlock_)
1043 {
1044     typeExpr->SetParent(this);
1045     if (id)
1046     {
1047         id->SetParent(this);
1048     }
1049     catchBlock->SetParent(this);
1050 }


Declaration at line 523 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 1065 of Statement.cpp :
1066 {
1067     visitor.Visit(*this);
1068 }


Declaration at line 525 of Statement.hpp

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

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


CatchBlock Member Function

const CompoundStatementNode * sngcm::ast::CatchNode::CatchBlock() const

Definition at line 532 of Statement.hpp :
532 { return catchBlock.get(); }


CatchBlock Member Function

CompoundStatementNode * sngcm::ast::CatchNode::CatchBlock()

Definition at line 533 of Statement.hpp :
533 { return catchBlock.get(); }

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


Clone Member Function

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

Definition at line 1052 of Statement.cpp
Declaration at line 524 of Statement.hpp

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

Calls: sngcm::ast::CatchNode::Clone , sngcm::ast::CatchNode::SetLeftParenSpan , sngcm::ast::CatchNode::SetRightParenSpan , sngcm::ast::Node::GetSpan

Called by: sngcm::ast::CatchNode::Clone


Id Member Function

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

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


Id Member Function

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

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

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


LeftParenSpan Member Function

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

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


Read Member Function

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

Definition at line 1085 of Statement.cpp
Declaration at line 527 of Statement.hpp

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

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


RightParenSpan Member Function

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

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


SetLeftParenSpan Member Function

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

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

Called by: sngcm::ast::CatchNode::Clone


SetRightParenSpan Member Function

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

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

Called by: sngcm::ast::CatchNode::Clone


TypeExpr Member Function

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

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


TypeExpr Member Function

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

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

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


Write Member Function

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

Definition at line 1070 of Statement.cpp
Declaration at line 526 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::AstWriter::Write , sngcm::ast::Node::Write , soulng::util::BinaryWriter::Write


top | up | prev | next