top | up | prev | next

IntLiteralNode Class

Definition at line 105 of Literal.hpp

Constructors

IntLiteralNode(const Span& span_)
IntLiteralNode(const Span& span_, int32_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
int32_t Value() const
void Write(AstWriter& writer) override

Member Variables

int32_t value

Constructor Details

IntLiteralNode Constructor

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

Definition at line 291 of Literal.cpp :
291 : LiteralNode(NodeType::intLiteralNodespan_)value(0)
292 {
293 }


Declaration at line 108 of Literal.hpp


IntLiteralNode Constructor

sngcm::ast::IntLiteralNode::IntLiteralNode(const Span& span_, int32_t value_)

Definition at line 295 of Literal.cpp :
295 : LiteralNode(NodeType::intLiteralNodespan_)value(value_)
296 {
297 }


Declaration at line 109 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 304 of Literal.cpp :
305 {
306     visitor.Visit(*this);
307 }


Declaration at line 111 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 299 of Literal.cpp :
300 {
301     return new IntLiteralNode(GetSpan()value);
302 }


Declaration at line 110 of Literal.hpp

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

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


Read Member Function

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

Definition at line 315 of Literal.cpp :
316 {
317     LiteralNode::Read(reader);
318     value = reader.GetBinaryReader().ReadInt();
319 }


Declaration at line 113 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::ReadInt


ToString Member Function

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

Definition at line 321 of Literal.cpp :
322 {
323     return std::to_string(value);
324 }


Declaration at line 114 of Literal.hpp

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


Value Member Function

int32_t sngcm::ast::IntLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 309 of Literal.cpp :
310 {
311     LiteralNode::Write(writer);
312     writer.GetBinaryWriter().Write(value);
313 }


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