Move ev_types into types.[ch]

No wonder I couldn't find it the other day...
This commit is contained in:
Bill Currie 2019-06-10 18:04:25 +09:00
parent 08ab42fc15
commit efdfc7436f
4 changed files with 18 additions and 17 deletions

View File

@ -210,7 +210,6 @@ typedef struct expr_s {
} e;
} expr_t;
extern struct type_s *ev_types[];
extern const char *expr_names[];
/** Report a type mismatch error.

View File

@ -170,4 +170,6 @@ void chain_initial_types (void);
void clear_typedefs (void);
extern type_t *ev_types[];
#endif//__type_h

View File

@ -67,22 +67,6 @@
static expr_t *exprs_freelist;
type_t *ev_types[ev_type_count] = {
&type_void,
&type_string,
&type_float,
&type_vector,
&type_entity,
&type_field,
&type_function,
&type_pointer,
&type_quaternion,
&type_integer,
&type_uinteger,
&type_short,
&type_invalid,
};
void
convert_name (expr_t *e)
{

View File

@ -88,6 +88,22 @@ type_t type_type_encodings = { ev_invalid, "@type_encodings", ty_struct };
type_t type_floatfield = { ev_field, ".float", ty_none, {{&type_float}} };
type_t *ev_types[ev_type_count] = {
&type_void,
&type_string,
&type_float,
&type_vector,
&type_entity,
&type_field,
&type_function,
&type_pointer,
&type_quaternion,
&type_integer,
&type_uinteger,
&type_short,
&type_invalid,
};
static type_t *types_freelist;
etype_t