top | up | prev | next

SByteLiteralNode Class

Definition at line 45 of Literal.hpp

Constructors

SByteLiteralNode(const Span& span_)
SByteLiteralNode(const Span& span_, int8_t value_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
std::string ToString() const override
int8_t Value() const
void Write(AstWriter& writer) override

Member Variables

int8_t value

Constructor Details

SByteLiteralNode Constructor

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

Definition at line 151 of Literal.cpp :
151 : LiteralNode(NodeType::sbyteLiteralNodespan_)value(0)
152 {
153 }


Declaration at line 48 of Literal.hpp


SByteLiteralNode Constructor

sngcm::ast::SByteLiteralNode::SByteLiteralNode(const Span& span_, int8_t value_)

Definition at line 155 of Literal.cpp :
155 : LiteralNode(NodeType::sbyteLiteralNodespan_)value(value_)
156 {
157 }


Declaration at line 49 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 164 of Literal.cpp :
165 {
166     visitor.Visit(*this);
167 }


Declaration at line 51 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 159 of Literal.cpp :
160 {
161     return new SByteLiteralNode(GetSpan()value);
162 }


Declaration at line 50 of Literal.hpp

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

Calls: sngcm::ast::Node::GetSpan


Read Member Function

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

Definition at line 175 of Literal.cpp :
176 {
177     LiteralNode::Read(reader);
178     value = reader.GetBinaryReader().ReadSByte();
179 }


Declaration at line 53 of Literal.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::LiteralNode::Read , soulng::util::BinaryReader::ReadSByte


ToString Member Function

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

Definition at line 181 of Literal.cpp :
182 {
183     return std::to_string(value);
184 }


Declaration at line 54 of Literal.hpp

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


Value Member Function

int8_t sngcm::ast::SByteLiteralNode::Value() const

Definition at line 55 of Literal.hpp :
 55 { return value; }

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


Write Member Function

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

Definition at line 169 of Literal.cpp :
170 {
171     LiteralNode::Write(writer);
172     writer.GetBinaryWriter().Write(value);
173 }


Declaration at line 52 of Literal.hpp

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

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


top | up | prev | next