top | up | prev | next

ConditionalCompilationStatementNode Class

Definition at line 668 of Statement.hpp

Constructors

ConditionalCompilationStatementNode(const Span& span_)
ConditionalCompilationStatementNode(const Span& span_, ConditionalCompilationExpressionNode* ifExpr_)

Member Functions

void Accept(Visitor& visitor) override
void AddElifExpr(const Span& span, ConditionalCompilationExpressionNode* expr)
void AddElifPart(ConditionalCompilationPartNode* elifPart)
void AddElifStatement(StatementNode* statement)
void AddElseStatement(const Span& span, 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_)

Definition at line 1421 of Statement.cpp :
1421 : StatementNode(NodeType::conditionalCompilationStatementNodespan_)ifPart(nullptr)
1422 {
1423 }


Declaration at line 671 of Statement.hpp


ConditionalCompilationStatementNode Constructor

sngcm::ast::ConditionalCompilationStatementNode::ConditionalCompilationStatementNode(const Span& span_, ConditionalCompilationExpressionNode * ifExpr_)

Definition at line 1425 of Statement.cpp :
1425 :
1426 StatementNode(NodeType::conditionalCompilationStatementNodespan_)ifPart(new ConditionalCompilationPartNode(span_ifExpr_))
1427 {
1428 }


Declaration at line 672 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 1490 of Statement.cpp :
1491 {
1492     visitor.Visit(*this);
1493 }


Declaration at line 674 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, ConditionalCompilationExpressionNode * expr)

Definition at line 1435 of Statement.cpp :
1436 {
1437     elifParts.Add(new ConditionalCompilationPartNode(spanexpr));
1438 }


Declaration at line 678 of Statement.hpp

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


AddElifPart Member Function

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

Definition at line 1530 of Statement.cpp :
1531 {
1532     elifParts.Add(elifPart);
1533 }


Declaration at line 690 of Statement.hpp

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


AddElifStatement Member Function

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

Definition at line 1440 of Statement.cpp :
1441 {
1442     elifParts[elifParts.Count() - 1]->AddStatement(statement);
1443 }


Declaration at line 679 of Statement.hpp

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


AddElseStatement Member Function

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

Definition at line 1460 of Statement.cpp :
1461 {
1462     if (!elsePart)
1463     {
1464         elsePart.reset(new ConditionalCompilationPartNode(span));
1465     }
1466     elsePart->AddStatement(statement);
1467 }


Declaration at line 680 of Statement.hpp


AddIfStatement Member Function

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

Definition at line 1430 of Statement.cpp :
1431 {
1432     ifPart->AddStatement(statement);
1433 }


Declaration at line 677 of Statement.hpp


Clone Member Function

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

Definition at line 1469 of Statement.cpp
Declaration at line 673 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::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 682 of Statement.hpp :
682 { return elifParts; }

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


ElsePart Member Function

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

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

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


EndIfSpan Member Function

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

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


IfPart Member Function

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

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

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


Read Member Function

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

Definition at line 1509 of Statement.cpp
Declaration at line 676 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 1455 of Statement.cpp :
1456 {
1457     elifParts[elifParts.Count() - 1]->SetKeywordSpan(span);
1458 }


Declaration at line 686 of Statement.hpp

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


SetElifLeftParenSpan Member Function

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

Definition at line 1445 of Statement.cpp :
1446 {
1447     elifParts[elifParts.Count() - 1]->SetLeftParenSpan(span);
1448 }


Declaration at line 684 of Statement.hpp

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


SetElifRightParenSpan Member Function

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

Definition at line 1450 of Statement.cpp :
1451 {
1452     elifParts[elifParts.Count() - 1]->SetRightParenSpan(span);
1453 }


Declaration at line 685 of Statement.hpp

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


SetElsePart Member Function

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

Definition at line 1535 of Statement.cpp :
1536 {
1537     elsePart.reset(elsePart_);
1538 }


Declaration at line 691 of Statement.hpp


SetEndIfSpan Member Function

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

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

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


SetIfPart Member Function

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

Definition at line 1525 of Statement.cpp :
1526 {
1527     ifPart.reset(ifPart_);
1528 }


Declaration at line 689 of Statement.hpp


Write Member Function

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

Definition at line 1495 of Statement.cpp
Declaration at line 675 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