Line data Source code
1 : #ifndef TREE_H
2 : #define TREE_H
3 :
4 : #include "statements/ast_body.h"
5 : #include <memory>
6 :
7 : namespace nicole {
8 :
9 : class Tree final {
10 : private:
11 : std::shared_ptr<AST_BODY> root_;
12 :
13 : public:
14 : explicit Tree(const std::shared_ptr<AST_BODY> &root) noexcept
15 0 : : root_{root} {}
16 :
17 0 : [[nodiscard]] const std::shared_ptr<AST_BODY> &root() const noexcept {
18 0 : return root_;
19 0 : }
20 : };
21 :
22 : } // namespace nicole
23 :
24 : #endif
|