top | up | prev | next

ByteLiteralNode Class

Definition at line 60 of Literal.hpp

Constructors

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

Definition at line 186 of Literal.cpp :
186 : LiteralNode(NodeType::byteLiteralNodespan_)value(0u)
187 {
188 }


Declaration at line 63 of Literal.hpp


ByteLiteralNode Constructor

sngcm::ast::ByteLiteralNode::ByteLiteralNode(const Span& span_, uint8_t value_)

Definition at line 190 of Literal.cpp :
190 : LiteralNode(NodeType::byteLiteralNodespan_)value(value_)
191 {
192 }


Declaration at line 64 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 199 of Literal.cpp :
200 {
201     visitor.Visit(*this);
202 }


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 194 of Literal.cpp :
195 {
196     return new ByteLiteralNode(GetSpan()value);
197 }


Declaration at line 65 of Literal.hpp

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

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


Read Member Function

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

Definition at line 210 of Literal.cpp :
211 {
212     LiteralNode::Read(reader);
213     value = reader.GetBinaryReader().ReadByte();
214 }


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 216 of Literal.cpp :
217 {
218     return std::to_string(value) + "u";
219 }


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 204 of Literal.cpp :
205 {
206     LiteralNode::Write(writer);
207     writer.GetBinaryWriter().Write(value);
208 }


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