top | up | prev | next

UIntLiteralNode Class

Definition at line 120 of Literal.hpp

Constructors

UIntLiteralNode(const Span& span_)
UIntLiteralNode(const Span& span_, uint32_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
uint32_t Value() const
void Write(AstWriter& writer) override

Member Variables

uint32_t value

Constructor Details

UIntLiteralNode Constructor

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

Definition at line 326 of Literal.cpp :
326 : LiteralNode(NodeType::uintLiteralNodespan_)value(0u)
327 {
328 }


Declaration at line 123 of Literal.hpp


UIntLiteralNode Constructor

sngcm::ast::UIntLiteralNode::UIntLiteralNode(const Span& span_, uint32_t value_)

Definition at line 330 of Literal.cpp :
330 : LiteralNode(NodeType::uintLiteralNodespan_)value(value_)
331 {
332 }


Declaration at line 124 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 339 of Literal.cpp :
340 {
341     visitor.Visit(*this);
342 }


Declaration at line 126 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 334 of Literal.cpp :
335 {
336     return new UIntLiteralNode(GetSpan()value);
337 }


Declaration at line 125 of Literal.hpp

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

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


Read Member Function

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

Definition at line 350 of Literal.cpp :
351 {
352     LiteralNode::Read(reader);
353     value = reader.GetBinaryReader().ReadUInt();
354 }


Declaration at line 128 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::ReadUInt


ToString Member Function

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

Definition at line 356 of Literal.cpp :
357 {
358     return std::to_string(value) + "u";
359 }


Declaration at line 129 of Literal.hpp

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


Value Member Function

uint32_t sngcm::ast::UIntLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 344 of Literal.cpp :
345 {
346     LiteralNode::Write(writer);
347     writer.GetBinaryWriter().Write(value);
348 }


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