tan  0.0.1
package.h
1 #ifndef __TAN_SRC_ANALYSIS_PACKAGE_H__
2 #define __TAN_SRC_ANALYSIS_PACKAGE_H__
3 
4 #include "base/container.h"
5 #include "ast/ast_base.h"
6 #include "common/dependency_graph.h"
7 
8 namespace tanlang {
9 
10 class ASTBase;
11 
12 class Package : public ASTBase {
13 public:
14  Package() = delete;
15  Package(const str &name, vector<ASTBase *> subtrees);
16  [[nodiscard]] vector<ASTBase *> get_children() const override;
17  str get_name() const { return _name; }
18 
19  bool is_expr() const override { return false; }
20  bool is_stmt() const override { return false; }
21 
22 public:
23  DependencyGraph<ASTBase *> top_level_symbol_dependency{};
24 
25 private:
26  str _name;
27  vector<ASTBase *> _subtrees{};
28 };
29 
30 } // namespace tanlang
31 
32 #endif //__TAN_SRC_ANALYSIS_PACKAGE_H__
vector< ASTBase * > get_children() const override
Get a ordered list of child nodes.
Definition: package.cpp:8