top | up | prev | next

RangeForStatementNode Class

Definition at line 348 of Statement.hpp

Constructors

RangeForStatementNode(const Span& span_)
RangeForStatementNode(const Span& span_, Node* typeExpr_, IdentifierNode* id_, Node* container_, StatementNode* action_)

Member Functions

void Accept(Visitor& visitor) override
const StatementNode* Action() const
StatementNode* Action()
Node* Clone(CloneContext& cloneContext) const override
const Span& ColonSpan() const
const Node* Container() const
Node* Container()
const IdentifierNode* Id() const
IdentifierNode* Id()
bool IsBreakEnclosingStatementNode() const override
bool IsContinueEnclosingStatementNode() const override
const Span& LeftParenSpan() const
void Read(AstReader& reader) override
const Span& RightParenSpan() const
void SetColonSpan(const Span& colonSpan_)
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<StatementNode> action
Span colonSpan
std::unique_ptr<Node> container
std::unique_ptr<IdentifierNode> id
Span leftParenSpan
Span rightParenSpan
std::unique_ptr<Node> typeExpr

Constructor Details

RangeForStatementNode Constructor

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

Definition at line 694 of Statement.cpp :
 694 : StatementNode(NodeType::rangeForStatementNodespan_)typeExpr()id()container()action()
 695 {
 696 }


Declaration at line 351 of Statement.hpp


RangeForStatementNode Constructor

sngcm::ast::RangeForStatementNode::RangeForStatementNode(const Span& span_, Node * typeExpr_, IdentifierNode * id_, Node * container_, StatementNode * action_)

Definition at line 698 of Statement.cpp :
 698 :
 699 StatementNode(NodeType::rangeForStatementNodespan_)typeExpr(typeExpr_)id(id_)container(container_)action(action_)
 700 {
 701     typeExpr->SetParent(this);
 702     id->SetParent(this);
 703     container->SetParent(this);
 704     action->SetParent(this);
 705 }


Declaration at line 352 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 717 of Statement.cpp :
 718 {
 719     visitor.Visit(*this);
 720 }


Declaration at line 354 of Statement.hpp

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

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


Action Member Function

const StatementNode * sngcm::ast::RangeForStatementNode::Action() const

Definition at line 365 of Statement.hpp :
365 { return action.get(); }


Action Member Function

StatementNode * sngcm::ast::RangeForStatementNode::Action()

Definition at line 366 of Statement.hpp :
366 { return action.get(); }

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


Clone Member Function

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

Definition at line 707 of Statement.cpp :
 708 {
 709     RangeForStatementNode* clone = new RangeForStatementNode(GetSpan()typeExpr->Clone(cloneContext)static_cast<IdentifierNode*>(id->Clone(cloneContext))container->Clone(cloneContext)
 710         static_cast<StatementNode*>(action->Clone(cloneContext)));
 711     clone->SetLeftParenSpan(leftParenSpan);
 712     clone->SetRightParenSpan(rightParenSpan);
 713     clone->SetColonSpan(colonSpan);
 714     return clone;
 715 }


Declaration at line 353 of Statement.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::RangeForStatementNode::Clone , sngcm::ast::RangeForStatementNode::SetColonSpan , sngcm::ast::RangeForStatementNode::SetLeftParenSpan , sngcm::ast::RangeForStatementNode::SetRightParenSpan

Called by: sngcm::ast::RangeForStatementNode::Clone


ColonSpan Member Function

const Span& sngcm::ast::RangeForStatementNode::ColonSpan() const

Definition at line 372 of Statement.hpp :
372 { return colonSpan; }


Container Member Function

const Node * sngcm::ast::RangeForStatementNode::Container() const

Definition at line 363 of Statement.hpp :
363 { return container.get(); }


Container Member Function

Node * sngcm::ast::RangeForStatementNode::Container()

Definition at line 364 of Statement.hpp :
364 { return container.get(); }

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


Id Member Function

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

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


Id Member Function

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

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

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


IsBreakEnclosingStatementNode Member Function

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

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

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


IsContinueEnclosingStatementNode Member Function

bool sngcm::ast::RangeForStatementNode::IsContinueEnclosingStatementNode() const override

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

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


LeftParenSpan Member Function

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

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


Read Member Function

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

Definition at line 734 of Statement.cpp
Declaration at line 356 of Statement.hpp

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

Calls: sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::AstReader::ReadStatementNode , sngcm::ast::Node::SetParent , sngcm::ast::StatementNode::Read


RightParenSpan Member Function

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

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


SetColonSpan Member Function

void sngcm::ast::RangeForStatementNode::SetColonSpan(const Span& colonSpan_)

Definition at line 371 of Statement.hpp :
371 { colonSpan = colonSpan_; }

Called by: sngcm::ast::RangeForStatementNode::Clone


SetLeftParenSpan Member Function

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

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

Called by: sngcm::ast::RangeForStatementNode::Clone


SetRightParenSpan Member Function

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

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

Called by: sngcm::ast::RangeForStatementNode::Clone


TypeExpr Member Function

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

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


TypeExpr Member Function

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

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

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


Write Member Function

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

Definition at line 722 of Statement.cpp :
 723 {
 724     StatementNode::Write(writer);
 725     writer.Write(typeExpr.get());
 726     writer.Write(id.get());
 727     writer.Write(container.get());
 728     writer.Write(action.get());
 729     writer.Write(leftParenSpan);
 730     writer.Write(rightParenSpan);
 731     writer.Write(colonSpan);
 732 }


Declaration at line 355 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::Write , sngcm::ast::StatementNode::Write


top | up | prev | next