linc 0.7
Linc is a general-purpose programming language inspired by C
Loading...
Searching...
No Matches
linc::Types::type Class Referencefinal

Classes

struct  Array
 
struct  Function
 

Public Types

enum class  Kind {
  Primitive , Array , Structure , Function ,
  Enumeration
}
 
using Primitive = Types::Kind
 
using Structure = std::vector<std::pair<std::string, std::unique_ptr<const type>>>
 
using Enumeration = std::vector<std::pair<std::string, Types::type>>
 

Public Member Functions

 type (Primitive primitive, bool is_mutable=false)
 
 type (const Structure &_structure, bool is_mutable=false)
 
 type (const Enumeration &_enumeration, bool is_mutable=false)
 
 type (const Array &_array, bool is_mutable=false)
 
 type (const Function &_function, bool is_mutable=false)
 
 type (const type &other)
 
 type (type &&other)
 
typeoperator= (const type &other)
 
typeoperator= (type &&other)
 
std::string toString (bool ignore_mutability=false) const
 
std::unique_ptr< const typeclone () const
 
bool operator== (const type &other) const
 
bool operator!= (const type &other) const
 
bool isAssignableTo (const type &other) const
 
bool isCompatible (const type &other) const
 

Static Public Member Functions

static Structure cloneStructure (const Structure *structure, bool is_mutable)
 
static Function cloneFunction (const Function *function)
 

Public Attributes

Kind kind
 
union { 
 
   Primitive   primitive 
 
   Array   array 
 
   Structure   structure 
 
   Function   function 
 
   Enumeration   enumeration 
 
};  
 
bool isMutable
 

The documentation for this class was generated from the following files: