tan  0.0.1
typed.h
1 #ifndef __TAN_SRC_AST_TYPED_H__
2 #define __TAN_SRC_AST_TYPED_H__
3 #include "base.h"
4 #include "fwd.h"
5 
6 namespace tanlang {
7 
8 /**
9  * \brief All typed AST nodes should inherit this class
10  */
11 class Typed {
12 public:
13  virtual Type *get_type() const;
14  virtual void set_type(Type *type);
15  virtual ~Typed() = default;
16 
17 private:
18  Type *_type = nullptr;
19 };
20 
21 } // namespace tanlang
22 
23 #endif //__TAN_SRC_AST_TYPED_H__
Type is immutable once created. The exception is StructType. Its information is updated in multiple s...
Definition: type.h:22
All typed AST nodes should inherit this class.
Definition: typed.h:11