top | up | prev | next

IntLiteralNode Class

Definition at line 105 of Literal.hpp

Constructors

IntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
IntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int32_t value_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
void SetValue(int32_t value_)
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_, const boost::uuids::uuid& moduleId_)

Definition at line 304 of Literal.cpp :
304 :
305 LiteralNode(NodeType::intLiteralNodespan_moduleId_)value(0)
306 {
307 }


Declaration at line 108 of Literal.hpp


IntLiteralNode Constructor

sngcm::ast::IntLiteralNode::IntLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int32_t value_)

Definition at line 309 of Literal.cpp :
309 :
310 LiteralNode(NodeType::intLiteralNodespan_moduleId_)value(value_)
311 {
312 }


Declaration at line 109 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 320 of Literal.cpp :
321 {
322     visitor.Visit(*this);
323 }


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 314 of Literal.cpp :
315 {
316     IntLiteralNode* clone = new IntLiteralNode(GetSpan()ModuleId()value);
317     return clone;
318 }


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

Definition at line 331 of Literal.cpp :
332 {
333     LiteralNode::Read(reader);
334     value = reader.GetBinaryReader().ReadInt();
335 }


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


SetValue Member Function

void sngcm::ast::IntLiteralNode::SetValue(int32_t value_)

Definition at line 116 of Literal.hpp :
116 { value = value_; }


ToString Member Function

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

Definition at line 337 of Literal.cpp :
338 {
339     return std::to_string(value);
340 }


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 325 of Literal.cpp :
326 {
327     LiteralNode::Write(writer);
328     writer.GetBinaryWriter().Write(value);
329 }


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