top | up | prev | next

WCharLiteralNode Class

Definition at line 210 of Literal.hpp

Constructors

WCharLiteralNode(const Span& span_)
WCharLiteralNode(const Span& span_, char16_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
char16_t Value() const
void Write(AstWriter& writer) override

Member Variables

char16_t value

Constructor Details

WCharLiteralNode Constructor

sngcm::ast::WCharLiteralNode::WCharLiteralNode(const Span& span_)

Definition at line 536 of Literal.cpp :
536 : LiteralNode(NodeType::wcharLiteralNodespan_)value('\0')
537 {
538 }


Declaration at line 213 of Literal.hpp


WCharLiteralNode Constructor

sngcm::ast::WCharLiteralNode::WCharLiteralNode(const Span& span_, char16_t value_)

Definition at line 540 of Literal.cpp :
540 : LiteralNode(NodeType::wcharLiteralNodespan_)value(value_)
541 {
542 }


Declaration at line 214 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 549 of Literal.cpp :
550 {
551     visitor.Visit(*this);
552 }


Declaration at line 216 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 544 of Literal.cpp :
545 {
546     return new WCharLiteralNode(GetSpan()value);
547 }


Declaration at line 215 of Literal.hpp

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

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


Read Member Function

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

Definition at line 560 of Literal.cpp :
561 {
562     LiteralNode::Read(reader);
563     value = reader.GetBinaryReader().ReadWChar();
564 }


Declaration at line 218 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::ReadWChar


ToString Member Function

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

Definition at line 566 of Literal.cpp :
567 {
568     return "w'" + ToUtf8(CharStr(char32_t(value))) + "'";
569 }


Declaration at line 219 of Literal.hpp

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


Value Member Function

char16_t sngcm::ast::WCharLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 554 of Literal.cpp :
555 {
556     LiteralNode::Write(writer);
557     writer.GetBinaryWriter().Write(value);
558 }


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