top | up | prev | next

SimpleDeclarationNode Class

Definition at line 14 of Declaration.hpp

Constructors

SimpleDeclarationNode()
SimpleDeclarationNode(const Span& span_, Specifier specifiers_, Node* typeExpr_, Node* declarator_)

Member Functions

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

Member Variables

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

Constructor Details

SimpleDeclarationNode Constructor

sngcpp::ast::SimpleDeclarationNode::SimpleDeclarationNode()

Definition at line 13 of Declaration.cpp :
 13 : Node(NodeType::simpleDeclarationNode)specifiers()
 14 {
 15 }


Declaration at line 17 of Declaration.hpp


SimpleDeclarationNode Constructor

sngcpp::ast::SimpleDeclarationNode::SimpleDeclarationNode(const Span& span_, Specifier specifiers_, Node * typeExpr_, Node * declarator_)

Definition at line 17 of Declaration.cpp :
 17 :
 18 Node(NodeType::simpleDeclarationNodespan_)specifiers(specifiers_)typeExpr(typeExpr_)declarator(declarator_)
 19 {
 20 }


Declaration at line 18 of Declaration.hpp


Member Function Details

Accept Member Function

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

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


Declaration at line 19 of Declaration.hpp

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

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


Declarator Member Function

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

Definition at line 24 of Declaration.hpp :
 24 { return declarator.get(); }


Read Member Function

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

Definition at line 40 of Declaration.cpp :
 41 {
 42     Node::Read(reader);
 43     specifiers = reader.ReadSpecifiers();
 44     typeExpr.reset(reader.ReadNode());
 45     bool hasDeclarator = reader.GetBinaryReader().ReadBool();
 46     if (hasDeclarator)
 47     {
 48         declarator.reset(reader.ReadNode());
 49     }
 50 }


Declaration at line 21 of Declaration.hpp

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

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


Specifiers Member Function

Specifier sngcpp::ast::SimpleDeclarationNode::Specifiers() const

Definition at line 22 of Declaration.hpp :
 22 { return specifiers; }


TypeExpr Member Function

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

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


Write Member Function

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

Definition at line 27 of Declaration.cpp
Declaration at line 20 of Declaration.hpp

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

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

Called by: sngcpp::ast::SimpleDeclarationNode::Write


top | up | prev | next