sammine-lang
Loading...
Searching...
No Matches
Types.h File Reference

Defines the core Type system for Sammine. More...

#include "util/QualifiedName.h"
#include "util/Utilities.h"
#include <array>
#include <map>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <variant>
#include <vector>
Include dependency graph for Types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FunctionType
class  PointerType
class  ArrayType
class  StructType
class  EnumType
struct  EnumType::VariantInfo
class  TupleType
struct  Type
struct  TypeMapOrdering

Typedefs

using TypePtr = std::shared_ptr<Type>
using TypeData

Enumerations

enum class  TypeKind {
  I32_t , I64_t , U32_t , U64_t ,
  F64_t , Unit , Bool , Char ,
  String , Function , Pointer , Array ,
  Struct , Enum , Tuple , Never ,
  NonExistent , Poisoned , Integer , Flt ,
  TypeParam
}

Functions

std::optional< std::string > incompatibility_hint (const Type &expected, const Type &actual)
bool is_builtin_type_name (std::string_view name)

Variables

constexpr std::array< std::string_view, 10 > kBuiltinTypeNames

Detailed Description

Defines the core Type system for Sammine.

Typedef Documentation

◆ TypeData

using TypeData
Initial value:
EnumType, TupleType, std::string, std::monostate>
Definition Types.h:68
Definition Types.h:97
Definition Types.h:43
Definition Types.h:60
Definition Types.h:78
Definition Types.h:126

Variable Documentation

◆ kBuiltinTypeNames

std::array<std::string_view, 10> kBuiltinTypeNames
inlineconstexpr
Initial value:
= {
"i32", "i64", "f32", "f64", "bool", "char", "u32", "u64", "string", "unit"}