top | up | prev | next

UCharLiteralNode Class

Definition at line 226 of Literal.hpp

Constructors

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

Member Variables

char32_t value

Constructor Details

UCharLiteralNode Constructor

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

Definition at line 606 of Literal.cpp :
606 :
607 LiteralNode(NodeType::ucharLiteralNodespan_moduleId_)value('\0')
608 {
609 }


Declaration at line 229 of Literal.hpp


UCharLiteralNode Constructor

sngcm::ast::UCharLiteralNode::UCharLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, char32_t value_)

Definition at line 611 of Literal.cpp :
611 :
612 LiteralNode(NodeType::ucharLiteralNodespan_moduleId_)value(value_)
613 {
614 }


Declaration at line 230 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 622 of Literal.cpp :
623 {
624     visitor.Visit(*this);
625 }


Declaration at line 232 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 616 of Literal.cpp :
617 {
618     UCharLiteralNode* clone = new UCharLiteralNode(GetSpan()ModuleId()value);
619     return clone;
620 }


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

Definition at line 633 of Literal.cpp :
634 {
635     LiteralNode::Read(reader);
636     value = reader.GetBinaryReader().ReadUChar();
637 }


Declaration at line 234 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::ReadUChar


ToString Member Function

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

Definition at line 639 of Literal.cpp :
640 {
641     return "u'" + ToUtf8(CharStr(value)) + "'";
642 }


Declaration at line 235 of Literal.hpp

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


Value Member Function

char32_t sngcm::ast::UCharLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 627 of Literal.cpp :
628 {
629     LiteralNode::Write(writer);
630     writer.GetBinaryWriter().Write(value);
631 }


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