top | up | prev | next

ParameterNode Class

Definition at line 14 of Parameter.hpp

Constructors

ParameterNode(const Span& span_)
ParameterNode(const Span& span_, Node* typeExpr_, IdentifierNode* id_)

Member Functions

void Accept(Visitor& visitor) override
bool ArtificialId() const
Node* Clone(CloneContext& cloneContext) const override
IdentifierNode* Id() const
void Read(AstReader& reader) override
void SetId(IdentifierNode* id_)
Node* TypeExpr() const
void Write(AstWriter& writer) override

Member Variables

bool artificialId
std::unique_ptr<IdentifierNode> id
std::unique_ptr<Node> typeExpr

Constructor Details

ParameterNode Constructor

sngcm::ast::ParameterNode::ParameterNode(const Span& span_)

Definition at line 14 of Parameter.cpp :
14 : Node(NodeType::parameterNodespan_)typeExpr()id()artificialId(false)
15 {
16 }


Declaration at line 17 of Parameter.hpp


ParameterNode Constructor

sngcm::ast::ParameterNode::ParameterNode(const Span& span_, Node * typeExpr_, IdentifierNode * id_)

Definition at line 18 of Parameter.cpp :
18 : Node(NodeType::parameterNodespan_)typeExpr(typeExpr_)id(id_)artificialId(false)
19 {
20     typeExpr->SetParent(this);
21     if (id)
22     {
23         id->SetParent(this);
24     }
25 }


Declaration at line 18 of Parameter.hpp


Member Function Details

Accept Member Function

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

Definition at line 42 of Parameter.cpp :
43 {
44     visitor.Visit(*this);
45 }


Declaration at line 20 of Parameter.hpp

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

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


ArtificialId Member Function

bool sngcm::ast::ParameterNode::ArtificialId() const

Definition at line 26 of Parameter.hpp :
26 { return artificialId; }


Clone Member Function

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

Definition at line 27 of Parameter.cpp
Declaration at line 19 of Parameter.hpp

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

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

Called by: sngcm::ast::ParameterNode::Clone


Id Member Function

IdentifierNode * sngcm::ast::ParameterNode::Id() const

Definition at line 24 of Parameter.hpp :
24 { return id.get(); }

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


Read Member Function

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

Definition at line 60 of Parameter.cpp
Declaration at line 22 of Parameter.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , soulng::util::BinaryReader::ReadBool


SetId Member Function

void sngcm::ast::ParameterNode::SetId(IdentifierNode * id_)

Definition at line 74 of Parameter.cpp :
75 {
76     id.reset(id_);
77     id->SetParent(this);
78     artificialId = true;
79 }


Declaration at line 25 of Parameter.hpp

Calls: sngcm::ast::Node::SetParent


TypeExpr Member Function

Node * sngcm::ast::ParameterNode::TypeExpr() const

Definition at line 23 of Parameter.hpp :
23 { return typeExpr.get(); }

Called by: sngcm::ast::ConstructorConstraintNode::ToString , sngcm::ast::FunctionConstraintNode::ToString , sngcm::ast::MemberFunctionConstraintNode::ToString , sngcm::ast::SourceWriter::Visit


Write Member Function

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

Definition at line 47 of Parameter.cpp
Declaration at line 21 of Parameter.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::Node::Write , soulng::util::BinaryWriter::Write


top | up | prev | next