diff options
Diffstat (limited to 'types.hpp')
-rw-r--r-- | types.hpp | 32 |
1 files changed, 22 insertions, 10 deletions
@@ -1,17 +1,29 @@ #ifndef TYPES_HPP_INCLUDED
#define TYPES_HPP_INCLUDED
-enum eCoreType
+#include <vector>
+#include "coretypes.hpp"
+#include "ast/ast.hpp"
+
+class TypeRef
{
- CORETYPE_ANY,
- CORETYPE_CHAR,
- CORETYPE_UINT, CORETYPE_INT,
- CORETYPE_U8, CORETYPE_I8,
- CORETYPE_U16, CORETYPE_I16,
- CORETYPE_U32, CORETYPE_I32,
- CORETYPE_U64, CORETYPE_I64,
- CORETYPE_f32,
- CORETYPE_f64,
+public:
+ TypeRef() {}
+ struct TagPrimitive {};
+ TypeRef(TagPrimitive, enum eCoreType type) {}
+ struct TagTuple {};
+ TypeRef(TagTuple _, ::std::vector<TypeRef> inner_types) {}
+ struct TagReference {};
+ TypeRef(TagReference _, bool is_mut, TypeRef inner_type) {}
+ struct TagPointer {};
+ TypeRef(TagPointer _, bool is_mut, TypeRef inner_type) {}
+ struct TagSizedArray {};
+ TypeRef(TagSizedArray _, TypeRef inner_type, AST::Expr size) {}
+ struct TagUnsizedArray {};
+ TypeRef(TagUnsizedArray _, TypeRef inner_type) {}
+
+ struct TagPath {};
+ TypeRef(TagPath, AST::Path path) {}
};
#endif // TYPES_HPP_INCLUDED
|