top | up | prev | next

UnaryMinusNode Class

Definition at line 265 of Expression.hpp

Constructors

UnaryMinusNode(const Span& span_, const boost::uuids::uuid& moduleId_)
UnaryMinusNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* subject_)

Member Functions

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

Constructor Details

UnaryMinusNode Constructor

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

Definition at line 631 of Expression.cpp :
 631 : UnaryNode(NodeType::unaryMinusNodespan_moduleId_)
 632 {
 633 }


Declaration at line 268 of Expression.hpp


UnaryMinusNode Constructor

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

Definition at line 635 of Expression.cpp :
 635 : UnaryNode(NodeType::unaryMinusNodespan_moduleId_subject_)
 636 {
 637 }


Declaration at line 269 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 645 of Expression.cpp :
 646 {
 647     visitor.Visit(*this);
 648 }


Declaration at line 271 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 639 of Expression.cpp :
 640 {
 641     UnaryMinusNode* clone = new UnaryMinusNode(GetSpan()ModuleId()Subject()->Clone(cloneContext));
 642     return clone;
 643 }


Declaration at line 270 of Expression.hpp

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

Calls: sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::UnaryNode::Subject


ToString Member Function

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

Definition at line 650 of Expression.cpp :
 651 {
 652     return "-" + Subject()->ToString();
 653 }


Declaration at line 272 of Expression.hpp

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

Calls: sngcm::ast::Node::ToString , sngcm::ast::UnaryNode::Subject


top | up | prev | next