top | up | prev | next

LongLiteralNode Class

Definition at line 136 of Literal.hpp

Constructors

LongLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
LongLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int64_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
int64_t Value() const
void Write(AstWriter& writer) override

Member Variables

int64_t value

Constructor Details

LongLiteralNode Constructor

sngcm::ast::LongLiteralNode::LongLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 380 of Literal.cpp :
380 :
381 LiteralNode(NodeType::longLiteralNodespan_moduleId_)value(0)
382 {
383 }


Declaration at line 139 of Literal.hpp


LongLiteralNode Constructor

sngcm::ast::LongLiteralNode::LongLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int64_t value_)

Definition at line 385 of Literal.cpp :
385 :
386 LiteralNode(NodeType::longLiteralNodespan_moduleId_)value(value_)
387 {
388 }


Declaration at line 140 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 396 of Literal.cpp :
397 {
398     visitor.Visit(*this);
399 }


Declaration at line 142 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 390 of Literal.cpp :
391 {
392     LongLiteralNode* clone = new LongLiteralNode(GetSpan()ModuleId()value);
393     return clone;
394 }


Declaration at line 141 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::LongLiteralNode::Read(AstReader & reader) override

Definition at line 407 of Literal.cpp :
408 {
409     LiteralNode::Read(reader);
410     value = reader.GetBinaryReader().ReadLong();
411 }


Declaration at line 144 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::ReadLong


ToString Member Function

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

Definition at line 413 of Literal.cpp :
414 {
415     return std::to_string(value);
416 }


Declaration at line 145 of Literal.hpp

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


Value Member Function

int64_t sngcm::ast::LongLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 401 of Literal.cpp :
402 {
403     LiteralNode::Write(writer);
404     writer.GetBinaryWriter().Write(value);
405 }


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