top | up | prev | next

WCharLiteralNode Class

Definition at line 211 of Literal.hpp

Constructors

WCharLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
WCharLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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_, const boost::uuids::uuid& moduleId_)

Definition at line 568 of Literal.cpp :
568 :
569 LiteralNode(NodeType::wcharLiteralNodespan_moduleId_)value('\0')
570 {
571 }


Declaration at line 214 of Literal.hpp


WCharLiteralNode Constructor

sngcm::ast::WCharLiteralNode::WCharLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, char16_t value_)

Definition at line 573 of Literal.cpp :
573 :
574 LiteralNode(NodeType::wcharLiteralNodespan_moduleId_)value(value_)
575 {
576 }


Declaration at line 215 of Literal.hpp


Member Function Details

Accept Member Function

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

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


Declaration at line 217 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 578 of Literal.cpp :
579 {
580     WCharLiteralNode* clone = new WCharLiteralNode(GetSpan()ModuleId()value);
581     return clone;
582 }


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

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


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


Declaration at line 220 of Literal.hpp

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


Value Member Function

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

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

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


Write Member Function

void sngcm::ast::WCharLiteralNode::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 218 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