top | up | prev | next

UStringLiteralNode Class

Definition at line 271 of Literal.hpp

Constructors

UStringLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
UStringLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, const std::u32string& value_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
std::string ToString() const override
const std::u32string& Value() const
void Write(AstWriter& writer) override

Member Variables

std::u32string value

Constructor Details

UStringLiteralNode Constructor

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

Definition at line 720 of Literal.cpp :
720 :
721 LiteralNode(NodeType::ustringLiteralNodespan_moduleId_)value()
722 {
723 }


Declaration at line 274 of Literal.hpp


UStringLiteralNode Constructor

sngcm::ast::UStringLiteralNode::UStringLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, const std::u32string& value_)

Definition at line 725 of Literal.cpp :
725 :
726 LiteralNode(NodeType::ustringLiteralNodespan_moduleId_)value(value_)
727 {
728 }


Declaration at line 275 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 736 of Literal.cpp :
737 {
738     visitor.Visit(*this);
739 }


Declaration at line 277 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 730 of Literal.cpp :
731 {
732     UStringLiteralNode* clone = new UStringLiteralNode(GetSpan()ModuleId()value);
733     return clone;
734 }


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

Definition at line 747 of Literal.cpp :
748 {
749     LiteralNode::Read(reader);
750     value = reader.GetBinaryReader().ReadUtf32String();
751 }


Declaration at line 279 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::ReadUtf32String


ToString Member Function

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

Definition at line 753 of Literal.cpp :
754 {
755     return "\"" + StringStr(ToUtf8(value)) + "\"";
756 }


Declaration at line 280 of Literal.hpp

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


Value Member Function

const std::u32string& sngcm::ast::UStringLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 741 of Literal.cpp :
742 {
743     LiteralNode::Write(writer);
744     writer.GetBinaryWriter().Write(value);
745 }


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