top | up | prev | next

AddNode Class

Definition at line 195 of Expression.hpp

Constructors

AddNode(const Span& span_, const boost::uuids::uuid& moduleId_)
AddNode(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

AddNode Constructor

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

Definition at line 460 of Expression.cpp :
 460 : BinaryNode(NodeType::addNodespan_moduleId_)
 461 {
 462 }


Declaration at line 198 of Expression.hpp


AddNode Constructor

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

Definition at line 464 of Expression.cpp :
 464 : BinaryNode(NodeType::addNodespan_moduleId_left_right_)
 465 {
 466 }


Declaration at line 199 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 474 of Expression.cpp :
 475 {
 476     visitor.Visit(*this);
 477 }


Declaration at line 201 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 468 of Expression.cpp :
 469 {
 470     AddNode* clone = new AddNode(GetSpan()ModuleId()Left()->Clone(cloneContext)Right()->Clone(cloneContext));
 471     return clone;
 472 }


Declaration at line 200 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::AddNode::ToString() const override

Definition at line 479 of Expression.cpp :
 480 {
 481     return Left()->ToString() + " + " + Right()->ToString();
 482 }


Declaration at line 202 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