23 struct ps_type_tuple*
args;
30#define ps_type_field_arr_new() ps_dynarr_new(struct ps_type_field_arr)
31#define ps_type_field_arr_free(arr) ps_dynarr_free(arr)
37#define ps_type_variant_arr_new() ps_dynarr_new(struct ps_type_variant_arr)
38#define ps_type_variant_arr_free(arr) ps_dynarr_free(arr)
45#define ps_type_tuple_new() ps_dynarr_new(struct ps_type_tuple)
46#define ps_type_tuple_free(arr) ps_dynarr_free(arr)
Defines a dynamically-allocated array template.
Retrieval of associated data from custom enum (see enum.h).
#define PS_IPRINT_DECL(T)
struct ps_type_variant_arr * variants
struct ps_type_field_arr * fields
struct ps_type_tuple * args
struct ps_type_enum enum_
struct ps_type_struct struct_
struct ps_type_tuple * tuple
struct ps_token * unresolved
struct ps_type * ps_type_struct_new(struct ps_token *name)
Constructs a new empty struct type with the name name.
struct ps_type * ps_type_from_name(struct ps_token *name)
Returns the type associated with the given name (e.g.
struct ps_type * ps_type_enum_new(struct ps_token *name)
Constructs a new empty enum type with the name name.
bool ps_type_is_prim(enum ps_type_type type)
Returns whether type represents a primitive type.
struct ps_type * ps_type_from_tuple(struct ps_type_tuple *tuple)
Constructs and returns a type for the given tuple type tuple.
ps_type_type
The type of a type :)
void ps_type_struct_add(struct ps_type *type, struct ps_type_field field)
Adds the given field field to the struct type type.
struct ps_type * ps_type_prim_new(enum ps_type_type prim_type)
Constructs a new primitive type specified by prim_type.
struct ps_type * ps_type_unresolved_new(struct ps_token *name)
Constructs a new unresolved type corresponding to the given name.
void ps_type_enum_add(struct ps_type *type, struct ps_type_variant variant)
Adds the given variant variant to the struct type type.