top | up | prev | next

AsNode Class

Definition at line 344 of Expression.hpp

Constructors

AsNode(const Span& span_, const boost::uuids::uuid& moduleId_)
AsNode(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

AsNode Constructor

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

Definition at line 821 of Expression.cpp :
 821 : Node(NodeType::asNodespan_moduleId_)expr()targetTypeExpr()
 822 {
 823 }


Declaration at line 347 of Expression.hpp


AsNode Constructor

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

Definition at line 825 of Expression.cpp :
 825 : Node(NodeType::asNodespan_moduleId_)expr(expr_)targetTypeExpr(targetTypeExpr_)
 826 {
 827     expr->SetParent(this);
 828     targetTypeExpr->SetParent(this);
 829 }


Declaration at line 348 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 837 of Expression.cpp :
 838 {
 839     visitor.Visit(*this);
 840 }


Declaration at line 350 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 831 of Expression.cpp :
 832 {
 833     AsNode* clone = new AsNode(GetSpan()ModuleId()expr->Clone(cloneContext)targetTypeExpr->Clone(cloneContext));
 834     return clone;
 835 }


Declaration at line 349 of Expression.hpp

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

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

Called by: sngcm::ast::AsNode::Clone


Expr Member Function

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

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


Expr Member Function

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

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

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


Read Member Function

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

Definition at line 849 of Expression.cpp :
 850 {
 851     Node::Read(reader);
 852     expr.reset(reader.ReadNode());
 853     expr->SetParent(this);
 854     targetTypeExpr.reset(reader.ReadNode());
 855     targetTypeExpr->SetParent(this);
 856 }


Declaration at line 352 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::AsNode::TargetTypeExpr() const

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


TargetTypeExpr Member Function

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

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

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


ToString Member Function

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

Definition at line 858 of Expression.cpp :
 859 {
 860     return expr->ToString() + " as " + targetTypeExpr->ToString();
 861 }


Declaration at line 357 of Expression.hpp

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

Calls: sngcm::ast::AsNode::ToString

Called by: sngcm::ast::AsNode::ToString


Write Member Function

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

Definition at line 842 of Expression.cpp :
 843 {
 844     Node::Write(writer);
 845     writer.Write(expr.get());
 846     writer.Write(targetTypeExpr.get());
 847 }


Declaration at line 351 of Expression.hpp

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

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


top | up | prev | next