top | up | prev | next

LabelNode Class

Definition at line 15 of Statement.hpp

Constructors

LabelNode(const Span& span_, const boost::uuids::uuid& moduleId_)
LabelNode(const Span& span_, const boost::uuids::uuid& moduleId_, const std::u32string& label_)

Member Functions

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

Member Variables

std::u32string label

Constructor Details

LabelNode Constructor

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

Definition at line 12 of Statement.cpp :
  12 : Node(NodeType::labelNodespan_moduleId_)
  13 {
  14 }


Declaration at line 18 of Statement.hpp


LabelNode Constructor

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

Definition at line 16 of Statement.cpp :
  16 : Node(NodeType::labelNodespan_moduleId_)label(label_)
  17 {
  18 }


Declaration at line 19 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 26 of Statement.cpp :
  27 {
  28     visitor.Visit(*this);
  29 }


Declaration at line 21 of Statement.hpp

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

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

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


Clone Member Function

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

Definition at line 20 of Statement.cpp :
  21 {
  22     LabelNode* clone = new LabelNode(GetSpan()ModuleId()label);
  23     return clone;
  24 }


Declaration at line 20 of Statement.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId


Label Member Function

const std::u32string& sngcm::ast::LabelNode::Label() const

Definition at line 24 of Statement.hpp :
 24 { return label; }

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


Read Member Function

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

Definition at line 37 of Statement.cpp :
  38 {
  39     Node::Read(reader);
  40     label = reader.GetBinaryReader().ReadUtf32String();
  41 }


Declaration at line 23 of Statement.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::Node::Read , soulng::util::BinaryReader::ReadUtf32String


Write Member Function

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

Definition at line 31 of Statement.cpp :
  32 {
  33     Node::Write(writer);
  34     writer.GetBinaryWriter().Write(label);
  35 }


Declaration at line 22 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::Node::Write , soulng::util::BinaryWriter::Write


top | up | prev | next