top | up | prev | next

IsNode Class

Definition at line 325 of Expression.hpp

Constructors

IsNode(const Span& span_, const boost::uuids::uuid& moduleId_)
IsNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* expr_, Node* targetTypeExpr_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const Node* Expr() const
Node* Expr()
void Read(AstReader& reader) override
const Node* TargetTypeExpr() const
Node* TargetTypeExpr()
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> expr
std::unique_ptr<Node> targetTypeExpr

Constructor Details

IsNode Constructor

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

Definition at line 778 of Expression.cpp :
 778 : Node(NodeType::isNodespan_moduleId_)expr()targetTypeExpr()
 779 {
 780 }


Declaration at line 328 of Expression.hpp


IsNode Constructor

sngcm::ast::IsNode::IsNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * expr_, Node * targetTypeExpr_)

Definition at line 782 of Expression.cpp :
 782 :
 783 Node(NodeType::isNodespan_moduleId_)expr(expr_)targetTypeExpr(targetTypeExpr_)
 784 {
 785     expr->SetParent(this);
 786     targetTypeExpr->SetParent(this);
 787 }


Declaration at line 329 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 795 of Expression.cpp :
 796 {
 797     visitor.Visit(*this);
 798 }


Declaration at line 331 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 789 of Expression.cpp :
 790 {
 791     IsNode* clone = new IsNode(GetSpan()ModuleId()expr->Clone(cloneContext)targetTypeExpr->Clone(cloneContext));
 792     return clone;
 793 }


Declaration at line 330 of Expression.hpp

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

Calls: sngcm::ast::IsNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId

Called by: sngcm::ast::IsNode::Clone


Expr Member Function

const Node * sngcm::ast::IsNode::Expr() const

Definition at line 334 of Expression.hpp :
334 { return expr.get(); }


Expr Member Function

Node * sngcm::ast::IsNode::Expr()

Definition at line 335 of Expression.hpp :
335 { return expr.get(); }

Called by: sngcm::ast::SourceWriter::Visit


Read Member Function

void sngcm::ast::IsNode::Read(AstReader & reader) override

Definition at line 807 of Expression.cpp :
 808 {
 809     Node::Read(reader);
 810     expr.reset(reader.ReadNode());
 811     expr->SetParent(this);
 812     targetTypeExpr.reset(reader.ReadNode());
 813     targetTypeExpr->SetParent(this);
 814 }


Declaration at line 333 of Expression.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent


TargetTypeExpr Member Function

const Node * sngcm::ast::IsNode::TargetTypeExpr() const

Definition at line 336 of Expression.hpp :
336 { return targetTypeExpr.get();  }


TargetTypeExpr Member Function

Node * sngcm::ast::IsNode::TargetTypeExpr()

Definition at line 337 of Expression.hpp :
337 { return targetTypeExpr.get(); }

Called by: sngcm::ast::SourceWriter::Visit


ToString Member Function

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

Definition at line 816 of Expression.cpp :
 817 {
 818     return expr->ToString() + " is " + targetTypeExpr->ToString();
 819 }


Declaration at line 338 of Expression.hpp

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

Calls: sngcm::ast::IsNode::ToString

Called by: sngcm::ast::IsNode::ToString


Write Member Function

void sngcm::ast::IsNode::Write(AstWriter & writer) override

Definition at line 800 of Expression.cpp :
 801 {
 802     Node::Write(writer);
 803     writer.Write(expr.get());
 804     writer.Write(targetTypeExpr.get());
 805 }


Declaration at line 332 of Expression.hpp

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

Calls: sngcm::ast::Node::Write


top | up | prev | next