top | up | prev | next

ByteLiteralNode Class

Definition at line 60 of Literal.hpp

Constructors

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

Member Variables

uint8_t value

Constructor Details

ByteLiteralNode Constructor

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

Definition at line 191 of Literal.cpp :
191 :
192 LiteralNode(NodeType::byteLiteralNodespan_moduleId_)value(0u)
193 {
194 }


Declaration at line 63 of Literal.hpp


ByteLiteralNode Constructor

sngcm::ast::ByteLiteralNode::ByteLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, uint8_t value_)

Definition at line 196 of Literal.cpp :
196 :
197 LiteralNode(NodeType::byteLiteralNodespan_moduleId_)value(value_)
198 {
199 }


Declaration at line 64 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 207 of Literal.cpp :
208 {
209     visitor.Visit(*this);
210 }


Declaration at line 66 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 201 of Literal.cpp :
202 {
203     ByteLiteralNode* clone = new ByteLiteralNode(GetSpan()ModuleId()value);
204     return clone;
205 }


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

Definition at line 218 of Literal.cpp :
219 {
220     LiteralNode::Read(reader);
221     value = reader.GetBinaryReader().ReadByte();
222 }


Declaration at line 68 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::ReadByte


ToString Member Function

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

Definition at line 224 of Literal.cpp :
225 {
226     return std::to_string(value) + "u";
227 }


Declaration at line 69 of Literal.hpp

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


Value Member Function

uint8_t sngcm::ast::ByteLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 212 of Literal.cpp :
213 {
214     LiteralNode::Write(writer);
215     writer.GetBinaryWriter().Write(value);
216 }


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