top | up | prev | next

UnaryMinusNode Class

Definition at line 265 of Expression.hpp

Constructors

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

Definition at line 592 of Expression.cpp :
 592 : UnaryNode(NodeType::unaryMinusNodespan_)
 593 {
 594 }


Declaration at line 268 of Expression.hpp


UnaryMinusNode Constructor

sngcm::ast::UnaryMinusNode::UnaryMinusNode(const Span& span_, Node * subject_)

Definition at line 596 of Expression.cpp :
 596 : UnaryNode(NodeType::unaryMinusNodespan_subject_)
 597 {
 598 }


Declaration at line 269 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 605 of Expression.cpp :
 606 {
 607     visitor.Visit(*this);
 608 }


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 600 of Expression.cpp :
 601 {
 602     return new UnaryMinusNode(GetSpan()Subject()->Clone(cloneContext));
 603 }


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::UnaryNode::Subject


ToString Member Function

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

Definition at line 610 of Expression.cpp :
 611 {
 612     return "-" + Subject()->ToString();
 613 }


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