top | up | prev | next

ParameterNode Class

Definition at line 13 of Function.hpp

Constructors

ParameterNode()
ParameterNode(const Span& span_, Node* typeExpr_, Node* declarator_)

Member Functions

void Accept(Visitor& visitor) override
Node* Declarator()
void Read(Reader& reader) override
Node* TypeExpr()
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> declarator
std::unique_ptr<Node> typeExpr

Constructor Details

ParameterNode Constructor

sngcpp::ast::ParameterNode::ParameterNode()

Definition at line 13 of Function.cpp :
 13 : Node(NodeType::parameterNode)
 14 {
 15 }


Declaration at line 16 of Function.hpp


ParameterNode Constructor

sngcpp::ast::ParameterNode::ParameterNode(const Span& span_, Node * typeExpr_, Node * declarator_)

Definition at line 17 of Function.cpp :
 17 : Node(NodeType::parameterNodespan_)typeExpr(typeExpr_)declarator(declarator_)
 18 {
 19 }


Declaration at line 17 of Function.hpp


Member Function Details

Accept Member Function

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

Definition at line 21 of Function.cpp :
 22 {
 23     visitor.Visit(*this);
 24 }


Declaration at line 18 of Function.hpp

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

Calls: sngcpp::ast::Visitor::Visit


Declarator Member Function

Node * sngcpp::ast::ParameterNode::Declarator()

Definition at line 22 of Function.hpp :
22 { return declarator.get(); }


Read Member Function

void sngcpp::ast::ParameterNode::Read(Reader & reader) override

Definition at line 37 of Function.cpp :
 38 {
 39     Node::Read(reader);
 40     typeExpr.reset(reader.ReadNode());
 41     bool hasDeclarator = reader.GetBinaryReader().ReadBool();
 42     if (hasDeclarator)
 43     {
 44         declarator.reset(reader.ReadNode());
 45     }
 46 }


Declaration at line 20 of Function.hpp

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

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::Reader::ReadNode


TypeExpr Member Function

Node * sngcpp::ast::ParameterNode::TypeExpr()

Definition at line 21 of Function.hpp :
21 { return typeExpr.get(); }


Write Member Function

void sngcpp::ast::ParameterNode::Write(Writer & writer) override

Definition at line 26 of Function.cpp :
 27 {
 28     Node::Write(writer);
 29     typeExpr->Write(writer);
 30     writer.GetBinaryWriter().Write(declarator != nullptr);
 31     if (declarator)
 32     {
 33         declarator->Write(writer);
 34     }
 35 }


Declaration at line 19 of Function.hpp

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

Calls: sngcpp::ast::Node::Write , sngcpp::ast::ParameterNode::Write , sngcpp::ast::Writer::GetBinaryWriter

Called by: sngcpp::ast::ParameterNode::Write


top | up | prev | next