top | up | prev | next

IsNode Class

Definition at line 325 of Expression.hpp

Constructors

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

Definition at line 730 of Expression.cpp :
 730 : Node(NodeType::isNodespan_)expr()targetTypeExpr()
 731 {
 732 }


Declaration at line 328 of Expression.hpp


IsNode Constructor

sngcm::ast::IsNode::IsNode(const Span& span_, Node * expr_, Node * targetTypeExpr_)

Definition at line 734 of Expression.cpp :
 734 : Node(NodeType::isNodespan_)expr(expr_)targetTypeExpr(targetTypeExpr_)
 735 {
 736     expr->SetParent(this);
 737     targetTypeExpr->SetParent(this);
 738 }


Declaration at line 329 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 745 of Expression.cpp :
 746 {
 747     visitor.Visit(*this);
 748 }


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 740 of Expression.cpp :
 741 {
 742     return new IsNode(GetSpan()expr->Clone(cloneContext)targetTypeExpr->Clone(cloneContext));
 743 }


Declaration at line 330 of Expression.hpp

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

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

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 757 of Expression.cpp :
 758 {
 759     Node::Read(reader);
 760     expr.reset(reader.ReadNode());
 761     expr->SetParent(this);
 762     targetTypeExpr.reset(reader.ReadNode());
 763     targetTypeExpr->SetParent(this);
 764 }


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 766 of Expression.cpp :
 767 {
 768     return expr->ToString() + " is " + targetTypeExpr->ToString();
 769 }


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 750 of Expression.cpp :
 751 {
 752     Node::Write(writer);
 753     writer.Write(expr.get());
 754     writer.Write(targetTypeExpr.get());
 755 }


Declaration at line 332 of Expression.hpp

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

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


top | up | prev | next