top | up | prev | next

CompoundStatementNode Class

Definition at line 55 of Statement.hpp

Constructors

CompoundStatementNode()
CompoundStatementNode(const Span& span_)

Member Functions

void Accept(Visitor& visitor) override
void AddStatement(const Span& span_, Node* statement)
const Span& EndBraceSpan() const
void Read(Reader& reader) override
void SetEndBraceSpan(const Span& endBraceSpan_)
void Write(Writer& writer) override

Member Variables

Span endBraceSpan

Constructor Details

CompoundStatementNode Constructor

sngcpp::ast::CompoundStatementNode::CompoundStatementNode()

Definition at line 89 of Statement.cpp :
 89 : UnaryNode(NodeType::compoundStatementNode)
 90 {
 91 }


Declaration at line 58 of Statement.hpp


CompoundStatementNode Constructor

sngcpp::ast::CompoundStatementNode::CompoundStatementNode(const Span& span_)

Definition at line 93 of Statement.cpp :
 93 : UnaryNode(NodeType::compoundStatementNodespan_)
 94 {
 95 }


Declaration at line 59 of Statement.hpp


Member Function Details

Accept Member Function

void sngcpp::ast::CompoundStatementNode::Accept(Visitor & visitor) override

Definition at line 97 of Statement.cpp :
 98 {
 99     visitor.Visit(*this);
100 }


Declaration at line 60 of Statement.hpp

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

Calls: sngcpp::ast::Visitor::Visit


AddStatement Member Function

void sngcpp::ast::CompoundStatementNode::AddStatement(const Span& span_, Node * statement)

Definition at line 114 of Statement.cpp :
115 {
116     if (Child())
117     {
118         SetChild(new StatementSequenceNode(span_ReleaseChild()statement));
119     }
120     else
121     {
122         SetChild(statement);
123     }
124 }


Declaration at line 63 of Statement.hpp

Calls: sngcpp::ast::UnaryNode::Child , sngcpp::ast::UnaryNode::ReleaseChild , sngcpp::ast::UnaryNode::SetChild


EndBraceSpan Member Function

const Span& sngcpp::ast::CompoundStatementNode::EndBraceSpan() const

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


Read Member Function

void sngcpp::ast::CompoundStatementNode::Read(Reader & reader) override

Definition at line 108 of Statement.cpp :
109 {
110     UnaryNode::Read(reader);
111     reader.Read(endBraceSpan);
112 }


Declaration at line 62 of Statement.hpp

Base class overridden functions: sngcpp::ast::Node::Read , sngcpp::ast::UnaryNode::Read

Calls: sngcpp::ast::Reader::Read , sngcpp::ast::UnaryNode::Read


SetEndBraceSpan Member Function

void sngcpp::ast::CompoundStatementNode::SetEndBraceSpan(const Span& endBraceSpan_)

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


Write Member Function

void sngcpp::ast::CompoundStatementNode::Write(Writer & writer) override

Definition at line 102 of Statement.cpp :
103 {
104     UnaryNode::Write(writer);
105     writer.Write(endBraceSpan);
106 }


Declaration at line 61 of Statement.hpp

Base class overridden functions: sngcpp::ast::Node::Write , sngcpp::ast::UnaryNode::Write

Calls: sngcpp::ast::UnaryNode::Write , sngcpp::ast::Writer::Write


top | up | prev | next