top | up | prev | next

LabelNode Class

Definition at line 15 of Statement.hpp

Constructors

LabelNode(const Span& span_)
LabelNode(const Span& span_, 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_)

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


Declaration at line 18 of Statement.hpp


LabelNode Constructor

sngcm::ast::LabelNode::LabelNode(const Span& span_, const std::u32string& label_)

Definition at line 16 of Statement.cpp :
  16 : Node(NodeType::labelNodespan_)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 25 of Statement.cpp :
  26 {
  27     visitor.Visit(*this);
  28 }


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     return new LabelNode(GetSpan()label);
  23 }


Declaration at line 20 of Statement.hpp

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

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


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 36 of Statement.cpp :
  37 {
  38     Node::Read(reader);
  39     label = reader.GetBinaryReader().ReadUtf32String();
  40 }


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 30 of Statement.cpp :
  31 {
  32     Node::Write(writer);
  33     writer.GetBinaryWriter().Write(label);
  34 }


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