top | up | prev | next

UShortLiteralNode Class

Definition at line 90 of Literal.hpp

Constructors

UShortLiteralNode(const Span& span_)
UShortLiteralNode(const Span& span_, uint16_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
uint16_t Value() const
void Write(AstWriter& writer) override

Member Variables

uint16_t value

Constructor Details

UShortLiteralNode Constructor

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

Definition at line 256 of Literal.cpp :
256 : LiteralNode(NodeType::ushortLiteralNodespan_)value(0u)
257 {
258 }


Declaration at line 93 of Literal.hpp


UShortLiteralNode Constructor

sngcm::ast::UShortLiteralNode::UShortLiteralNode(const Span& span_, uint16_t value_)

Definition at line 260 of Literal.cpp :
260 : LiteralNode(NodeType::ushortLiteralNodespan_)value(value_)
261 {
262 }


Declaration at line 94 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 269 of Literal.cpp :
270 {
271     visitor.Visit(*this);
272 }


Declaration at line 96 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 264 of Literal.cpp :
265 {
266     return new UShortLiteralNode(GetSpan()value);
267 }


Declaration at line 95 of Literal.hpp

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

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


Read Member Function

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

Definition at line 280 of Literal.cpp :
281 {
282     LiteralNode::Read(reader);
283     value = reader.GetBinaryReader().ReadUShort();
284 }


Declaration at line 98 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::ReadUShort


ToString Member Function

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

Definition at line 286 of Literal.cpp :
287 {
288     return std::to_string(value) + "u";
289 }


Declaration at line 99 of Literal.hpp

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


Value Member Function

uint16_t sngcm::ast::UShortLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 274 of Literal.cpp :
275 {
276     LiteralNode::Write(writer);
277     writer.GetBinaryWriter().Write(value);
278 }


Declaration at line 97 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