top | up | prev | next

IdentifierNode Class

Definition at line 13 of Identifier.hpp

Constructors

IdentifierNode(const Span& span_)
IdentifierNode(const Span& span_, NodeType nodeType_)
IdentifierNode(const Span& span_, NodeType nodeType_, const std::u32string& identifier_)
IdentifierNode(const Span& span_, const Token& token)
IdentifierNode(const Span& span_, const std::u32string& identifier_)

Member Functions

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

Member Variables

std::u32string identifier

Constructor Details

IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_)

Definition at line 16 of Identifier.cpp :
 16 : Node(NodeType::identifierNodespan_)identifier()
 17 {
 18 }


Declaration at line 16 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, NodeType nodeType_)

Definition at line 20 of Identifier.cpp :
 20 : Node(nodeType_span_)identifier()
 21 {
 22 }


Declaration at line 17 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, NodeType nodeType_, const std::u32string& identifier_)

Definition at line 28 of Identifier.cpp
Declaration at line 19 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, const Token & token)

Definition at line 41 of Identifier.cpp :
 41 : Node(NodeType::identifierNodespan_)
 42 {
 43     identifier = std::u32string(token.match.begintoken.match.end);
 44 }


Declaration at line 20 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, const std::u32string& identifier_)

Definition at line 24 of Identifier.cpp :
 24 : Node(NodeType::identifierNodespan_)identifier(identifier_)
 25 {
 26 }


Declaration at line 18 of Identifier.hpp


Member Function Details

Accept Member Function

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

Definition at line 51 of Identifier.cpp :
 52 {
 53     visitor.Visit(*this);
 54 }


Declaration at line 22 of Identifier.hpp

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

Derived class overrides: sngcm::ast::CursorIdNode::Accept

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

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


Clone Member Function

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

Definition at line 46 of Identifier.cpp :
 47 {
 48     return new IdentifierNode(GetSpan()identifier);
 49 }


Declaration at line 21 of Identifier.hpp

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

Derived class overrides: sngcm::ast::CursorIdNode::Clone

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

Called by: sngcm::ast::UnnamedNamespaceProcessor::Visit


Read Member Function

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

Definition at line 62 of Identifier.cpp :
 63 {
 64     Node::Read(reader);
 65     identifier = reader.GetBinaryReader().ReadUtf32String();
 66 }


Declaration at line 24 of Identifier.hpp

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

Derived class overrides: sngcm::ast::CursorIdNode::Read

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

Called by: sngcm::ast::CursorIdNode::Read


SetStr Member Function

void sngcm::ast::IdentifierNode::SetStr(const std::u32string& str)

Definition at line 26 of Identifier.hpp :
26 { identifier = str; }

Called by: sngcm::ast::NamespaceCombiner::Visit


Str Member Function

const std::u32string& sngcm::ast::IdentifierNode::Str() const

Definition at line 25 of Identifier.hpp :
25 { return identifier; }

Called by: sngcm::ast::CursorIdNode::Clone , sngcm::ast::MergeVisitor::Visit , sngcm::ast::MergeVisitor::Visit , sngcm::ast::NamespaceCombiner::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit


ToString Member Function

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

Definition at line 68 of Identifier.cpp :
 69 {
 70     return ToUtf8(identifier);
 71 }


Declaration at line 27 of Identifier.hpp

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


Write Member Function

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

Definition at line 56 of Identifier.cpp :
 57 {
 58     Node::Write(writer);
 59     writer.GetBinaryWriter().Write(identifier);
 60 }


Declaration at line 23 of Identifier.hpp

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

Derived class overrides: sngcm::ast::CursorIdNode::Write

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

Called by: sngcm::ast::CursorIdNode::Write


top | up | prev | next