top | up | prev | next

ExpressionStatementNode Class

Definition at line 337 of Statement.hpp

Constructors

ExpressionStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ExpressionStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* expression_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const Node* Expression() const
Node* Expression()
void Read(AstReader& reader) override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> expression

Constructor Details

ExpressionStatementNode Constructor

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

Definition at line 694 of Statement.cpp :
 694 :
 695 StatementNode(NodeType::expressionStatementNodespan_moduleId_)expression()
 696 {
 697 }


Declaration at line 340 of Statement.hpp


ExpressionStatementNode Constructor

sngcm::ast::ExpressionStatementNode::ExpressionStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * expression_)

Definition at line 699 of Statement.cpp :
 699 :
 700 StatementNode(NodeType::expressionStatementNodespan_moduleId_)expression(expression_)
 701 {
 702     expression->SetParent(this);
 703 }


Declaration at line 341 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 711 of Statement.cpp :
 712 {
 713     visitor.Visit(*this);
 714 }


Declaration at line 343 of Statement.hpp

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

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


Clone Member Function

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

Definition at line 705 of Statement.cpp :
 706 {
 707     ExpressionStatementNode* clone = new ExpressionStatementNode(GetSpan()ModuleId()expression->Clone(cloneContext));
 708     return clone;
 709 }


Declaration at line 342 of Statement.hpp

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

Calls: sngcm::ast::ExpressionStatementNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId

Called by: sngcm::ast::ExpressionStatementNode::Clone


Expression Member Function

const Node * sngcm::ast::ExpressionStatementNode::Expression() const

Definition at line 346 of Statement.hpp :
346 { return expression.get(); }


Expression Member Function

Node * sngcm::ast::ExpressionStatementNode::Expression()

Definition at line 347 of Statement.hpp :
347 { return expression.get(); }

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


Read Member Function

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

Definition at line 722 of Statement.cpp :
 723 {
 724     StatementNode::Read(reader);
 725     expression.reset(reader.ReadNode());
 726     expression->SetParent(this);
 727 }


Declaration at line 345 of Statement.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::SetParent , sngcm::ast::StatementNode::Read


Write Member Function

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

Definition at line 716 of Statement.cpp :
 717 {
 718     StatementNode::Write(writer);
 719     writer.Write(expression.get());
 720 }


Declaration at line 344 of Statement.hpp

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

Calls: sngcm::ast::StatementNode::Write


top | up | prev | next