top | up | prev | next

LongLiteralNode Class

Definition at line 135 of Literal.hpp

Constructors

LongLiteralNode(const Span& span_)
LongLiteralNode(const Span& span_, 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_)

Definition at line 361 of Literal.cpp :
361 : LiteralNode(NodeType::longLiteralNodespan_)value(0)
362 {
363 }


Declaration at line 138 of Literal.hpp


LongLiteralNode Constructor

sngcm::ast::LongLiteralNode::LongLiteralNode(const Span& span_, int64_t value_)

Definition at line 365 of Literal.cpp :
365 : LiteralNode(NodeType::longLiteralNodespan_)value(value_)
366 {
367 }


Declaration at line 139 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 374 of Literal.cpp :
375 {
376     visitor.Visit(*this);
377 }


Declaration at line 141 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 369 of Literal.cpp :
370 {
371     return new LongLiteralNode(GetSpan()value);
372 }


Declaration at line 140 of Literal.hpp

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

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


Read Member Function

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

Definition at line 385 of Literal.cpp :
386 {
387     LiteralNode::Read(reader);
388     value = reader.GetBinaryReader().ReadLong();
389 }


Declaration at line 143 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 391 of Literal.cpp :
392 {
393     return std::to_string(value);
394 }


Declaration at line 144 of Literal.hpp

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


Value Member Function

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

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

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


Write Member Function

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

Definition at line 379 of Literal.cpp :
380 {
381     LiteralNode::Write(writer);
382     writer.GetBinaryWriter().Write(value);
383 }


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