top | up | prev | next

UIntLiteralNode Class

Definition at line 121 of Literal.hpp

Constructors

UIntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
UIntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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_, const boost::uuids::uuid& moduleId_)

Definition at line 342 of Literal.cpp :
342 :
343 LiteralNode(NodeType::uintLiteralNodespan_moduleId_)value(0u)
344 {
345 }


Declaration at line 124 of Literal.hpp


UIntLiteralNode Constructor

sngcm::ast::UIntLiteralNode::UIntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, uint32_t value_)

Definition at line 347 of Literal.cpp :
347 :
348 LiteralNode(NodeType::uintLiteralNodespan_moduleId_)value(value_)
349 {
350 }


Declaration at line 125 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 358 of Literal.cpp :
359 {
360     visitor.Visit(*this);
361 }


Declaration at line 127 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 352 of Literal.cpp :
353 {
354     UIntLiteralNode* clone = new UIntLiteralNode(GetSpan()ModuleId()value);
355     return clone;
356 }


Declaration at line 126 of Literal.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId


Read Member Function

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

Definition at line 369 of Literal.cpp :
370 {
371     LiteralNode::Read(reader);
372     value = reader.GetBinaryReader().ReadUInt();
373 }


Declaration at line 129 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 375 of Literal.cpp :
376 {
377     return std::to_string(value) + "u";
378 }


Declaration at line 130 of Literal.hpp

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


Value Member Function

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

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

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


Write Member Function

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

Definition at line 363 of Literal.cpp :
364 {
365     LiteralNode::Write(writer);
366     writer.GetBinaryWriter().Write(value);
367 }


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