1
2
3
4
5
6 #ifndef SNGCM_AST_COMMENT_INCLUDED
7 #define SNGCM_AST_COMMENT_INCLUDED
8 #include <sngcm/ast/Node.hpp>
9
10 namespace sngcm { namespace ast {
11
12 class CommentNode : public Node
13 {
14 public:
15 CommentNode(const Span& span_);
16 CommentNode(const Span& span_, const std::u32string& comment_);
17 Node* Clone(CloneContext& cloneContext) const override;
18 void Accept(Visitor& visitor) override;
19 void Write(AstWriter& writer) override;
20 void Read(AstReader& reader) override;
21 const std::u32string& Comment() const { return comment; }
22 private:
23 std::u32string comment;
24 };
25
26 } }
27
28 #endif // SNGCM_AST_COMMENT_INCLUDED