top | up | prev | next

SubNode Class

Definition at line 205 of Expression.hpp

Constructors

SubNode(const Span& span_, const boost::uuids::uuid& moduleId_)
SubNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* left_, Node* right_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
std::string ToString() const override

Constructor Details

SubNode Constructor

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

Definition at line 484 of Expression.cpp :
 484 : BinaryNode(NodeType::subNodespan_moduleId_)
 485 {
 486 }


Declaration at line 208 of Expression.hpp


SubNode Constructor

sngcm::ast::SubNode::SubNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * left_, Node * right_)

Definition at line 488 of Expression.cpp :
 488 :
 489 BinaryNode(NodeType::subNodespan_moduleId_left_right_)
 490 {
 491 }


Declaration at line 209 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 499 of Expression.cpp :
 500 {
 501     visitor.Visit(*this);
 502 }


Declaration at line 211 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 493 of Expression.cpp :
 494 {
 495     SubNode* clone = new SubNode(GetSpan()ModuleId()Left()->Clone(cloneContext)Right()->Clone(cloneContext));
 496     return clone;
 497 }


Declaration at line 210 of Expression.hpp

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

Calls: sngcm::ast::BinaryNode::Left , sngcm::ast::BinaryNode::Right , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId


ToString Member Function

std::string sngcm::ast::SubNode::ToString() const override

Definition at line 504 of Expression.cpp :
 505 {
 506     return Left()->ToString() + " - " + Right()->ToString();
 507 }


Declaration at line 212 of Expression.hpp

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

Calls: sngcm::ast::BinaryNode::Left , sngcm::ast::BinaryNode::Right , sngcm::ast::Node::ToString


top | up | prev | next