top | up | prev | next

ExpressionStatementNode Class

Definition at line 325 of Statement.hpp

Constructors

ExpressionStatementNode(const Span& span_)
ExpressionStatementNode(const Span& span_, 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_)

Definition at line 646 of Statement.cpp :
 646 : StatementNode(NodeType::expressionStatementNodespan_)expression()
 647 {
 648 }


Declaration at line 328 of Statement.hpp


ExpressionStatementNode Constructor

sngcm::ast::ExpressionStatementNode::ExpressionStatementNode(const Span& span_, Node * expression_)

Definition at line 650 of Statement.cpp :
 650 : StatementNode(NodeType::expressionStatementNodespan_)expression(expression_)
 651 {
 652     expression->SetParent(this);
 653 }


Declaration at line 329 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 661 of Statement.cpp :
 662 {
 663     visitor.Visit(*this);
 664 }


Declaration at line 331 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 655 of Statement.cpp :
 656 {
 657     ExpressionStatementNode* clone = new ExpressionStatementNode(GetSpan()expression->Clone(cloneContext));
 658     return clone;
 659 }


Declaration at line 330 of Statement.hpp

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

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

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


Expression Member Function

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

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


Expression Member Function

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

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

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


Read Member Function

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

Definition at line 672 of Statement.cpp :
 673 {
 674     StatementNode::Read(reader);
 675     expression.reset(reader.ReadNode());
 676     expression->SetParent(this);
 677 }


Declaration at line 333 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 666 of Statement.cpp :
 667 {
 668     StatementNode::Write(writer);
 669     writer.Write(expression.get());
 670 }


Declaration at line 332 of Statement.hpp

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

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


top | up | prev | next