top | up | prev | next

UCharLiteralNode Class

Definition at line 225 of Literal.hpp

Constructors

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

Definition at line 571 of Literal.cpp :
571 : LiteralNode(NodeType::ucharLiteralNodespan_)value('\0')
572 {
573 }


Declaration at line 228 of Literal.hpp


UCharLiteralNode Constructor

sngcm::ast::UCharLiteralNode::UCharLiteralNode(const Span& span_, char32_t value_)

Definition at line 575 of Literal.cpp :
575 : LiteralNode(NodeType::ucharLiteralNodespan_)value(value_)
576 {
577 }


Declaration at line 229 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 584 of Literal.cpp :
585 {
586     visitor.Visit(*this);
587 }


Declaration at line 231 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 579 of Literal.cpp :
580 {
581     return new UCharLiteralNode(GetSpan()value);
582 }


Declaration at line 230 of Literal.hpp

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

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


Read Member Function

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

Definition at line 595 of Literal.cpp :
596 {
597     LiteralNode::Read(reader);
598     value = reader.GetBinaryReader().ReadUChar();
599 }


Declaration at line 233 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 601 of Literal.cpp :
602 {
603     return "u'" + ToUtf8(CharStr(value)) + "'";
604 }


Declaration at line 234 of Literal.hpp

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


Value Member Function

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

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

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


Write Member Function

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

Definition at line 589 of Literal.cpp :
590 {
591     LiteralNode::Write(writer);
592     writer.GetBinaryWriter().Write(value);
593 }


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