top | up | prev | next

StringLiteralNode Class

Definition at line 241 of Literal.hpp

Constructors

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

Member Variables

std::string value

Constructor Details

StringLiteralNode Constructor

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

Definition at line 644 of Literal.cpp :
644 :
645 LiteralNode(NodeType::stringLiteralNodespan_moduleId_)value()
646 {
647 }


Declaration at line 244 of Literal.hpp


StringLiteralNode Constructor

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

Definition at line 649 of Literal.cpp :
649 :
650 LiteralNode(NodeType::stringLiteralNodespan_moduleId_)value(value_)
651 {
652 }


Declaration at line 245 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 660 of Literal.cpp :
661 {
662     visitor.Visit(*this);
663 }


Declaration at line 247 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 654 of Literal.cpp :
655 {
656     StringLiteralNode* clone = new StringLiteralNode(GetSpan()ModuleId()value);
657     return clone;
658 }


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

Definition at line 671 of Literal.cpp :
672 {
673     LiteralNode::Read(reader);
674     value = reader.GetBinaryReader().ReadUtf8String();
675 }


Declaration at line 249 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::ReadUtf8String


ToString Member Function

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

Definition at line 677 of Literal.cpp :
678 {
679     return "\"" + StringStr(value) + "\"";
680 }


Declaration at line 250 of Literal.hpp

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


Value Member Function

const std::string& sngcm::ast::StringLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 665 of Literal.cpp :
666 {
667     LiteralNode::Write(writer);
668     writer.GetBinaryWriter().Write(value);
669 }


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