top | up | prev | next

IdentifierNode Class

Definition at line 13 of Identifier.hpp

Constructors

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

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
bool IsInternal() const
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_, const boost::uuids::uuid& moduleId_)

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


Declaration at line 16 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, const boost::uuids::uuid& moduleId_, NodeType nodeType_)

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


Declaration at line 17 of Identifier.hpp


IdentifierNode Constructor

sngcm::ast::IdentifierNode::IdentifierNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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 boost::uuids::uuid& moduleId_, const Token & token)

Definition at line 41 of Identifier.cpp :
 41 : Node(NodeType::identifierNodespan_moduleId_)
 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 boost::uuids::uuid& moduleId_, const std::u32string& identifier_)

Definition at line 24 of Identifier.cpp :
 24 : Node(NodeType::identifierNodespan_moduleId_)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 52 of Identifier.cpp :
 53 {
 54     visitor.Visit(*this);
 55 }


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     IdentifierNode* clone = new IdentifierNode(GetSpan()ModuleId()identifier);
 49     return clone;
 50 }


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 , sngcm::ast::Node::ModuleId

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


IsInternal Member Function

bool sngcm::ast::IdentifierNode::IsInternal() const

Definition at line 74 of Identifier.cpp :
 75 {
 76     return !identifier.empty() && identifier.front() == '@';
 77 }


Declaration at line 28 of Identifier.hpp


Read Member Function

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

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


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 69 of Identifier.cpp :
 70 {
 71     return ToUtf8(identifier);
 72 }


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 57 of Identifier.cpp :
 58 {
 59     Node::Write(writer);
 60     writer.GetBinaryWriter().Write(identifier);
 61 }


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