top | up | prev | next

SubNode Class

Definition at line 205 of Expression.hpp

Constructors

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

Definition at line 454 of Expression.cpp :
 454 : BinaryNode(NodeType::subNodespan_)
 455 {
 456 }


Declaration at line 208 of Expression.hpp


SubNode Constructor

sngcm::ast::SubNode::SubNode(const Span& span_, Node * left_, Node * right_)

Definition at line 458 of Expression.cpp :
 458 : BinaryNode(NodeType::subNodespan_left_right_)
 459 {
 460 }


Declaration at line 209 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 467 of Expression.cpp :
 468 {
 469     visitor.Visit(*this);
 470 }


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 462 of Expression.cpp :
 463 {
 464     return new SubNode(GetSpan()Left()->Clone(cloneContext)Right()->Clone(cloneContext));
 465 }


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


ToString Member Function

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

Definition at line 472 of Expression.cpp :
 473 {
 474     return Left()->ToString() + " - " + Right()->ToString();
 475 }


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