top | up | prev | next

ConditionalCompilationStatementNode Class

Definition at line 680 of Statement.hpp

Constructors

ConditionalCompilationStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ConditionalCompilationStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, ConditionalCompilationExpressionNode* ifExpr_)

Member Functions

void Accept(Visitor& visitor) override
void AddElifExpr(const Span& span, const boost::uuids::uuid& moduleId_, ConditionalCompilationExpressionNode* expr)
void AddElifPart(ConditionalCompilationPartNode* elifPart)
void AddElifStatement(StatementNode* statement)
void AddElseStatement(const Span& span, const boost::uuids::uuid& moduleId_, StatementNode* statement)
void AddIfStatement(StatementNode* statement)
Node* Clone(CloneContext& cloneContext) const override
const NodeList<ConditionalCompilationPartNode>& ElifParts() const
ConditionalCompilationPartNode* ElsePart()
const Span& EndIfSpan() const
ConditionalCompilationPartNode* IfPart()
void Read(AstReader& reader) override
void SetElifKeywordSpan(const Span& span)
void SetElifLeftParenSpan(const Span& span)
void SetElifRightParenSpan(const Span& span)
void SetElsePart(ConditionalCompilationPartNode* elsePart_)
void SetEndIfSpan(const Span& endifSpan_)
void SetIfPart(ConditionalCompilationPartNode* ifPart_)
void Write(AstWriter& writer) override

Member Variables

NodeList<ConditionalCompilationPartNode> elifParts
std::unique_ptr<ConditionalCompilationPartNode> elsePart
Span endifSpan
std::unique_ptr<ConditionalCompilationPartNode> ifPart

Constructor Details

ConditionalCompilationStatementNode Constructor

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

Definition at line 1501 of Statement.cpp :
1501 :
1502 StatementNode(NodeType::conditionalCompilationStatementNodespan_moduleId_)ifPart(nullptr)
1503 {
1504 }


Declaration at line 683 of Statement.hpp


ConditionalCompilationStatementNode Constructor

sngcm::ast::ConditionalCompilationStatementNode::ConditionalCompilationStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, ConditionalCompilationExpressionNode * ifExpr_)

Definition at line 1506 of Statement.cpp :
1506 :
1507 StatementNode(NodeType::conditionalCompilationStatementNodespan_moduleId_)ifPart(new ConditionalCompilationPartNode(span_moduleId_ifExpr_))
1508 {
1509 }


Declaration at line 684 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 1571 of Statement.cpp :
1572 {
1573     visitor.Visit(*this);
1574 }


Declaration at line 686 of Statement.hpp

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

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


AddElifExpr Member Function

void sngcm::ast::ConditionalCompilationStatementNode::AddElifExpr(const Span& span, const boost::uuids::uuid& moduleId_, ConditionalCompilationExpressionNode * expr)

Definition at line 1516 of Statement.cpp :
1517 {
1518     elifParts.Add(new ConditionalCompilationPartNode(spanmoduleId_expr));
1519 }


Declaration at line 690 of Statement.hpp

Calls: sngcm::ast::NodeList::Add


AddElifPart Member Function

void sngcm::ast::ConditionalCompilationStatementNode::AddElifPart(ConditionalCompilationPartNode * elifPart)

Definition at line 1612 of Statement.cpp :
1613 {
1614     elifParts.Add(elifPart);
1615 }


Declaration at line 702 of Statement.hpp

Calls: sngcm::ast::NodeList::Add


AddElifStatement Member Function

void sngcm::ast::ConditionalCompilationStatementNode::AddElifStatement(StatementNode * statement)

Definition at line 1521 of Statement.cpp :
1522 {
1523     elifParts[elifParts.Count() - 1]->AddStatement(statement);
1524 }


Declaration at line 691 of Statement.hpp

Calls: sngcm::ast::NodeList::Count


AddElseStatement Member Function

void sngcm::ast::ConditionalCompilationStatementNode::AddElseStatement(const Span& span, const boost::uuids::uuid& moduleId_, StatementNode * statement)

Definition at line 1541 of Statement.cpp :
1542 {
1543     if (!elsePart)
1544     {
1545         elsePart.reset(new ConditionalCompilationPartNode(spanmoduleId_));
1546     }
1547     elsePart->AddStatement(statement);
1548 }


Declaration at line 692 of Statement.hpp


AddIfStatement Member Function

void sngcm::ast::ConditionalCompilationStatementNode::AddIfStatement(StatementNode * statement)

Definition at line 1511 of Statement.cpp :
1512 {
1513     ifPart->AddStatement(statement);
1514 }


Declaration at line 689 of Statement.hpp


Clone Member Function

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

Definition at line 1550 of Statement.cpp
Declaration at line 685 of Statement.hpp

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

Calls: sngcm::ast::ConditionalCompilationPartNode::Clone , sngcm::ast::ConditionalCompilationStatementNode::Clone , sngcm::ast::ConditionalCompilationStatementNode::SetEndIfSpan , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Add , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConditionalCompilationStatementNode::Clone


ElifParts Member Function

const NodeList <ConditionalCompilationPartNode >& sngcm::ast::ConditionalCompilationStatementNode::ElifParts() const

Definition at line 694 of Statement.hpp :
694 { return elifParts; }

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


ElsePart Member Function

ConditionalCompilationPartNode * sngcm::ast::ConditionalCompilationStatementNode::ElsePart()

Definition at line 695 of Statement.hpp :
695 { return elsePart.get(); }

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


EndIfSpan Member Function

const Span& sngcm::ast::ConditionalCompilationStatementNode::EndIfSpan() const

Definition at line 700 of Statement.hpp :
700 { return endifSpan; }


IfPart Member Function

ConditionalCompilationPartNode * sngcm::ast::ConditionalCompilationStatementNode::IfPart()

Definition at line 693 of Statement.hpp :
693 { return ifPart.get(); }

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


Read Member Function

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

Definition at line 1591 of Statement.cpp
Declaration at line 688 of Statement.hpp

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

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


SetElifKeywordSpan Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetElifKeywordSpan(const Span& span)

Definition at line 1536 of Statement.cpp :
1537 {
1538     elifParts[elifParts.Count() - 1]->SetKeywordSpan(span);
1539 }


Declaration at line 698 of Statement.hpp

Calls: sngcm::ast::NodeList::Count


SetElifLeftParenSpan Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetElifLeftParenSpan(const Span& span)

Definition at line 1526 of Statement.cpp :
1527 {
1528     elifParts[elifParts.Count() - 1]->SetLeftParenSpan(span);
1529 }


Declaration at line 696 of Statement.hpp

Calls: sngcm::ast::NodeList::Count


SetElifRightParenSpan Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetElifRightParenSpan(const Span& span)

Definition at line 1531 of Statement.cpp :
1532 {
1533     elifParts[elifParts.Count() - 1]->SetRightParenSpan(span);
1534 }


Declaration at line 697 of Statement.hpp

Calls: sngcm::ast::NodeList::Count


SetElsePart Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetElsePart(ConditionalCompilationPartNode * elsePart_)

Definition at line 1617 of Statement.cpp :
1618 {
1619     elsePart.reset(elsePart_);
1620 }


Declaration at line 703 of Statement.hpp


SetEndIfSpan Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetEndIfSpan(const Span& endifSpan_)

Definition at line 699 of Statement.hpp :
699 { endifSpan = endifSpan_; }

Called by: sngcm::ast::ConditionalCompilationStatementNode::Clone


SetIfPart Member Function

void sngcm::ast::ConditionalCompilationStatementNode::SetIfPart(ConditionalCompilationPartNode * ifPart_)

Definition at line 1607 of Statement.cpp :
1608 {
1609     ifPart.reset(ifPart_);
1610 }


Declaration at line 701 of Statement.hpp


Write Member Function

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

Definition at line 1576 of Statement.cpp
Declaration at line 687 of Statement.hpp

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

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


top | up | prev | next