1
2
3
4
5
6 #ifndef SNGCPP_AST_NAMESPACE_INCLUDED
7 #define SNGCPP_AST_NAMESPACE_INCLUDED
8 #include <sngcpp/ast/Declaration.hpp>
9
10 namespace sngcpp { namespace ast {
11
12 class NamespaceNode : public UnaryNode
13 {
14 public:
15 NamespaceNode();
16 NamespaceNode(const Span& span_);
17 NamespaceNode(const Span& span_, const std::u32string& namespaceName_);
18 void Accept(Visitor& visitor) override;
19 void Write(Writer& writer) override;
20 void Read(Reader& reader) override;
21 const std::u32string& NamespaceName() const { return namespaceName; }
22 void AddMember(const Span& span, Node* member);
23 private:
24 std::u32string namespaceName;
25 };
26
27 } }
28
29 #endif // SNGCPP_AST_NAMESPACE_INCLUDED