top | up | prev | next

CommentNode Class

Definition at line 12 of Comment.hpp

Constructors

CommentNode(const Span& span_)
CommentNode(const Span& span_, const std::u32string& comment_)

Member Functions

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

Member Variables

std::u32string comment

Constructor Details

CommentNode Constructor

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

Definition at line 13 of Comment.cpp :
13 : Node(NodeType::commentNodespan_)
14 {
15 }


Declaration at line 15 of Comment.hpp


CommentNode Constructor

sngcm::ast::CommentNode::CommentNode(const Span& span_, const std::u32string& comment_)

Definition at line 17 of Comment.cpp :
17 : Node(NodeType::commentNodespan_)comment(comment_)
18 {
19 }


Declaration at line 16 of Comment.hpp


Member Function Details

Accept Member Function

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

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


Declaration at line 18 of Comment.hpp

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

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


Clone Member Function

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

Definition at line 21 of Comment.cpp :
22 {
23     return new CommentNode(GetSpan()comment);
24 }


Declaration at line 17 of Comment.hpp

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

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


Comment Member Function

const std::u32string& sngcm::ast::CommentNode::Comment() const

Definition at line 21 of Comment.hpp :
21 { return comment; }

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


Read Member Function

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

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


Declaration at line 20 of Comment.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::CommentNode::Write(AstWriter & writer) override

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


Declaration at line 19 of Comment.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